IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4540 for trunk/psLib/src/math


Ignore:
Timestamp:
Jul 12, 2005, 9:12:01 AM (21 years ago)
Author:
desonia
Message:

massive restructuring of codebase.

Location:
trunk/psLib/src/math
Files:
3 added
4 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/Makefile.am

    r4446 r4540  
    1 #Makefile for dataManip functions of psLib
     1#Makefile for math functions of psLib
    22#
    3 INCLUDES = \
    4         -I$(top_srcdir)/src/astro \
    5         -I$(top_srcdir)/src/db \
    6         -I$(top_srcdir)/src/fft \
    7         -I$(top_srcdir)/src/fits \
    8         -I$(top_srcdir)/src/imageops \
    9         -I$(top_srcdir)/src/math \
    10         -I$(top_srcdir)/src/mathtypes \
    11         -I$(top_srcdir)/src/sys \
    12         -I$(top_srcdir)/src/types \
    13         -I$(top_srcdir)/src/xml \
    14         $(all_includes)
     3noinst_LTLIBRARIES = libpslibmath.la
    154
    16 noinst_LTLIBRARIES = libpslibdataManip.la
     5libpslibmath_la_SOURCES = \
     6        psBinaryOp.c \
     7        psCompare.c \
     8        psMatrix.c \
     9        psMinimize.c \
     10        psRandom.c \
     11        psFunctions.c \
     12        psStats.c \
     13        psUnaryOp.c
    1714
    18 libpslibdataManip_la_SOURCES = psUnaryOp.c psBinaryOp.c psStats.c \
    19                 psFunctions.c psMatrix.c psVectorFFT.c psMinimize.c psRandom.c
    20 
    21 BUILT_SOURCES = psDataManipErrors.h
    22 EXTRA_DIST = psDataManipErrors.dat psDataManipErrors.h dataManip.i
    23 
    24 psDataManipErrors.h: psDataManipErrors.dat
    25         $(top_srcdir)/src/psParseErrorCodes --data=$? $@
     15EXTRA_DIST = math.i
    2616
    2717pslibincludedir = $(includedir)
    2818pslibinclude_HEADERS = \
     19        psBinaryOp.h \
     20        psCompare.h \
    2921        psConstants.h \
    30         psStats.h  \
     22        psMatrix.h \
     23        psMinimize.h \
     24        psRandom.h \
    3125        psFunctions.h \
    32         psMatrix.h \
    33     psBinaryOp.h \
    34     psUnaryOp.h \
    35         psVectorFFT.h \
    36         psMinimize.h \
    37         psRandom.h
    38 
     26        psStats.h \
     27        psUnaryOp.h
  • trunk/psLib/src/math/psBinaryOp.c

    r4342 r4540  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-22 02:05:41 $
     32 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-12 19:12:01 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5050#include "psLogMsg.h"
    5151#include "psConstants.h"
    52 #include "psDataManipErrors.h"
     52#include "psErrorText.h"
    5353
    5454/*****************************************************************************
     
    426426}
    427427
    428 psPtr psBinaryOp(psPtr out, const psPtr in1, const char *op, const psPtr in2)
     428psMathType* psBinaryOp(psPtr out, const psPtr in1, const char *op, const psPtr in2)
    429429{
    430430
  • trunk/psLib/src/math/psBinaryOp.h

    r4342 r4540  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-22 02:05:41 $
     32 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-12 19:12:01 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5555 *  @return  psType* : Pointer to either psImage or psVector.
    5656 */
    57 psType* psBinaryOp(
     57psMathType* psBinaryOp(
    5858    psPtr out,                         ///< Output type, either psImage or psVector.
    5959    const psPtr in1,                   ///< First input, either psImage or psVector.
  • trunk/psLib/src/math/psMatrix.c

    r4388 r4540  
    2121 *  @author Robert DeSonia, MHPCC
    2222 *
    23  *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-25 01:15:01 $
     23 *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-07-12 19:12:01 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4343#include "psMatrix.h"
    4444#include "psConstants.h"
    45 #include "psDataManipErrors.h"
     45#include "psErrorText.h"
    4646
    4747
  • trunk/psLib/src/math/psMinimize.c

    r4321 r4540  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.123 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-20 22:42:30 $
     11 *  @version $Revision: 1.124 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-07-12 19:12:01 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    13571357XXX: type F32 is done via vector conversion only.
    13581358 *****************************************************************************/
    1359 psPolynomial1D* psVectorFitPolynomial1D(psPolynomial1D* myPoly,
     1359psPolynomial1D* psVectorFitPolynomial1D(psPolynomial1D* poly,
    13601360                                        const psVector* x,
    13611361                                        const psVector* y,
    13621362                                        const psVector* yErr)
    13631363{
    1364     PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
    1365     PS_ASSERT_INT_NONNEGATIVE(myPoly->n, NULL);
     1364    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     1365    PS_ASSERT_INT_NONNEGATIVE(poly->n, NULL);
    13661366    PS_ASSERT_VECTOR_NON_NULL(y, NULL);
    13671367    PS_ASSERT_VECTOR_NON_EMPTY(y, NULL);
     
    13891389    if (x == NULL) {
    13901390        PS_VECTOR_GEN_X_INDEX_STATIC_F64(x64Static, y->n);
    1391         if (myPoly->type == PS_POLYNOMIAL_CHEB) {
     1391        if (poly->type == PS_POLYNOMIAL_CHEB) {
    13921392            p_psNormalizeVectorRangeF64(x64Static, -1.0, 1.0);
    13931393        }
     
    13961396        PS_ASSERT_VECTOR_TYPE_F32_OR_F64(x, NULL);
    13971397        PS_VECTOR_CONVERT_F32_TO_F64_STATIC(x, x64, x64Static);
    1398         if (myPoly->type == PS_POLYNOMIAL_CHEB) {
     1398        if (poly->type == PS_POLYNOMIAL_CHEB) {
    13991399            p_psNormalizeVectorRangeF64(x64, -1.0, 1.0);
    14001400        }
     
    14051405    // Call the appropriate vector fitting routine.
    14061406    psPolynomial1D *rc = NULL;
    1407     if (myPoly->type == PS_POLYNOMIAL_CHEB) {
    1408         rc = vectorFitPolynomial1DCheby(myPoly, x64, y64, yErr64);
    1409     } else if (myPoly->type == PS_POLYNOMIAL_ORD) {
    1410         rc = vectorFitPolynomial1DOrd(myPoly, x64, y64, yErr64);
     1407    if (poly->type == PS_POLYNOMIAL_CHEB) {
     1408        rc = vectorFitPolynomial1DCheby(poly, x64, y64, yErr64);
     1409    } else if (poly->type == PS_POLYNOMIAL_ORD) {
     1410        rc = vectorFitPolynomial1DOrd(poly, x64, y64, yErr64);
    14111411    } else {
    14121412        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     
    14191419    }
    14201420
    1421     return(myPoly);
     1421    return(poly);
    14221422}
    14231423
     
    14321432
    14331433    psMinimization *min = psAlloc(sizeof(psMinimization));
    1434     min->maxIter = maxIter;
    1435     min->tol = tol;
     1434    *(int*)&min->maxIter = maxIter;
     1435    *(float*)&min->tol = tol;
    14361436    min->value = 0.0;
    14371437    min->iter = 0;
     
    19931993        for (i=0;i<numDims;i++) {
    19941994            if (myParamMask->data.U8[i] == 0) {
    1995                 dummyMin.maxIter = PS_MINIMIZE_POWELL_LINEMIN_MAX_ITERATIONS;
    1996                 dummyMin.tol = PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE;
     1995                *(int*)&dummyMin.maxIter = PS_MINIMIZE_POWELL_LINEMIN_MAX_ITERATIONS;
     1996                *(float*)&dummyMin.tol = PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE;
    19971997                mul = p_psLineMin(&dummyMin,
    19981998                                  Q,
  • trunk/psLib/src/math/psMinimize.h

    r4330 r4540  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-21 03:01:37 $
     10 *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-07-12 19:12:01 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3838
    3939/** A data structure for minimization routines.
    40  * 
     40 *
    4141 *  Contains numerical analysis parameters/values
    4242 */
    4343typedef struct
    4444{
    45     psS32 maxIter;                     ///< Convergence limit
    46     psF32 tol;                         ///< Error Tolerance
    47     psF32 value;                       ///< Value of function at minimum
    48     psS32 iter;                        ///< Number of iterations to date
    49     psF32 lastDelta;                   ///< The last difference for the fit
     45    const int maxIter;                 ///< Convergence limit
     46    const float tol;                   ///< Error Tolerance
     47    float value;                       ///< Value of function at minimum
     48    int iter;                          ///< Number of iterations to date
     49    float lastDelta;                   ///< The last difference for the fit
    5050}
    5151psMinimization;
    5252
    5353/** Allocates a psMinimization structure.
    54  * 
     54 *
    5555 *  @return psMinimization* :   a new psMinimization struct
    5656*/
     
    7474 */
    7575psPolynomial1D* psVectorFitPolynomial1D(
    76     psPolynomial1D* myPoly,            ///< Polynomial to fit
     76    psPolynomial1D* poly,            ///< Polynomial to fit
    7777    const psVector* x,                 ///< Ordinates (or NULL to just use the indices)
    7878    const psVector* y,                 ///< Coordinates
     
    8181
    8282/** Derive a one-dimensional spline fit.
    83  *   
    84  *  Given a psSpline1D data structure and a set of x,y vectors, this routine 
     83 *
     84 *  Given a psSpline1D data structure and a set of x,y vectors, this routine
    8585 *  generates the linear splines which satisfy those data points.
    86  * 
     86 *
    8787 *  @return psSpline1D*:  the calculated one-dimensional splines
    8888 */
     
    9696/** Specifies the format of a user-defined function that the general Levenberg-
    9797 *  Marquardt minimizer routine will accept.
    98  * 
    99  *  @return psF64:   the single float value of the function given the parameters,
     98 *
     99 *  @return float:   the single float value of the function given the parameters,
    100100 *       positions, and derivatives.
    101101 */
    102102typedef
    103 psF64 (*psMinimizeLMChi2Func)(
     103float (*psMinimizeLMChi2Func)(
    104104    psVector *deriv,                   ///< derivatives of the function
    105     psVector *params,                  ///< the parameters used to evaluate the function
    106     psVector *x                        ///< positions for evaluation
     105    const psVector *params,            ///< the parameters used to evaluate the function
     106    const psVector *x                  ///< positions for evaluation
    107107);
    108108
    109109/** Minimizes a specified function based on the Levenberg-Marquardt method.
    110  * 
     110 *
    111111 *  @return bool:   True if successful.
    112112 */
     
    123123
    124124/** Use specified alpha, beta, params to generate a new guess for Alpha, Beta, Params
    125  * 
     125 *
    126126 *  @return psBool:   True if successful.
    127127 */
     
    138138
    139139/** Function used to set parameters for generating "best guess" in minimizing Chi-Squared value.
    140  * 
     140 *
    141141 *  @return psF64:    Chi-squared value for new guess
    142142 */
     
    153153/** Specifies the format of a user-defined function that the general Powell
    154154 *  minimizer routine will accept.
    155  * 
    156  *  @return psF32:   the single float value of the function given the parameters
     155 *
     156 *  @return float:   the single float value of the function given the parameters
    157157 *      and coordinate vectors.
    158158*/
    159159typedef
    160 psF32 (*psMinimizePowellFunc)(
     160float (*psMinimizePowellFunc)(
    161161    const psVector *params,            ///< Parameters used to evaluate the function
    162162    const psArray *coords              ///< Coordinates at which to evaluate
     
    164164
    165165/** Minimizes a specified function based on the Powell method.
    166  * 
     166 *
    167167 *  @return bool:   True if successful.
    168168 */
     
    177177/** Calculates the one-dimensional Gaussian in a format acceptable to the Levenberg-
    178178 *  Marquardt minimizer routine.
    179  * 
     179 *
    180180 *  @return psVector*:    Calculated values
    181181 */
     
    188188/** Calculates the one-dimensional Gaussian in a format acceptable to the Powell
    189189 *  chi-squared minimizer routine.
    190  * 
     190 *
    191191 *  @return psVector*:   Calculated values
    192192 */
     
    198198/** Specifies the format of a user-defined function that the general Powell chi-
    199199 *  squared minimizer routine will accept.
    200  * 
     200 *
    201201 *  @return psVector*:    Calculated values given the parameters and coordinates.
    202202*/
     
    208208
    209209/** Minimizes a specified function based on the Powell chi-squared method.
    210  * 
     210 *
    211211 *  @return bool:   True is successful.
    212212 */
     
    222222
    223223/** Gauss-Jordan numerical solver.
    224  * 
     224 *
    225225 *  @return bool:   True if successful.
    226226 */
  • trunk/psLib/src/math/psRandom.c

    r4330 r4540  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-06-21 03:01:37 $
     12*  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-07-12 19:12:01 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3131#include "psLogMsg.h"
    3232#include "psConstants.h"
    33 #include "psDataManipErrors.h"
     33#include "psErrorText.h"
    3434
    3535psU64 p_psRandomGetSystemSeed()
  • trunk/psLib/src/math/psStats.c

    r4409 r4540  
    1414 *      stats->binsize
    1515 *
    16  *  @version $Revision: 1.136 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-28 20:17:52 $
     16 *  @version $Revision: 1.137 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-07-12 19:12:01 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4141#include "psConstants.h"
    4242
    43 #include "psDataManipErrors.h"
     43#include "psErrorText.h"
    4444
    4545/*****************************************************************************/
     
    7777psBool p_psGetStatValue(const psStats* stats, psF64 *value)
    7878{
    79     switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {
     79    //    switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {
     80    switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE)) {
    8081    case PS_STAT_SAMPLE_MEAN:
    8182        *value = stats->sampleMean;
     
    658659        x.data.F32 = iMid - (PS_GAUSS_WIDTH * sigma);
    659660        if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) {
    660             jMin = p_psVectorBinDisect(robustHistogram->bounds, &x);
     661            jMin = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x);
    661662            if (jMin < 0) {
    662663                psError(PS_ERR_UNEXPECTED_NULL,
     
    673674        x.data.F32 = iMid + (PS_GAUSS_WIDTH * sigma);
    674675        if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) {
    675             jMax = p_psVectorBinDisect(robustHistogram->bounds, &x);
     676            jMax = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x);
    676677            if (jMax < 0) {
    677678                psError(PS_ERR_UNEXPECTED_NULL,
     
    17051706        //Determine id that is okay.
    17061707        stats->robustMedian = fitQuadraticSearchForYThenReturnX(
    1707                                   robustHistogram->bounds,
     1708                                  *(psVector* *)&robustHistogram->bounds,
    17081709                                  cumulativeRobustSums,
    17091710                                  medianBinNum,
     
    17211722        //Determine id that is okay.
    17221723        stats->robustLQ = fitQuadraticSearchForYThenReturnX(
    1723                               robustHistogram->bounds,
     1724                              *(psVector* *)&robustHistogram->bounds,
    17241725                              cumulativeRobustSums,
    17251726                              LQBinNum,
     
    17281729        //Determine id that is okay.
    17291730        stats->robustUQ = fitQuadraticSearchForYThenReturnX(
    1730                               robustHistogram->bounds,
     1731                              *(psVector* *)&robustHistogram->bounds,
    17311732                              cumulativeRobustSums,
    17321733                              UQBinNum,
     
    18121813    psMemSetDeallocator(newHist, (psFreeFunc) histogramFree);
    18131814    newHist->bounds = psVectorAlloc(n + 1, PS_TYPE_F32);
    1814     newHist->bounds->n = newHist->bounds->nalloc;
     1815    *(int *)&newHist->bounds->n = newHist->bounds->nalloc;
    18151816
    18161817    // Calculate the bounds for each bin.
     
    18591860    psMemSetDeallocator(newHist, (psFreeFunc) histogramFree);
    18601861    newHist->bounds = psVectorAlloc(bounds->n, PS_TYPE_F32);
    1861     newHist->bounds->n = newHist->bounds->nalloc;
     1862    *(int *)&newHist->bounds->n = newHist->bounds->nalloc;
    18621863    for (i = 0; i < bounds->n; i++) {
    18631864        newHist->bounds->data.F32[i] = bounds->data.F32[i];
     
    20672068                    // correct bin number requires a bit more work.
    20682069                    tmpScalar.data.F32 = inF32->data.F32[i];
    2069                     binNum = p_psVectorBinDisect(out->bounds, &tmpScalar);
     2070                    binNum = p_psVectorBinDisect( *(psVector* *)&out->bounds, &tmpScalar);
    20702071                    if (binNum < 0) {
    20712072                        psLogMsg(__func__, PS_LOG_WARN,
  • trunk/psLib/src/math/psStats.h

    r4409 r4540  
    1414 *  @author GLG, MHPCC
    1515 *
    16  *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-28 20:17:52 $
     16 *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-07-12 19:12:01 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5252    PS_STAT_USE_RANGE =  0x002000,          ///< Range
    5353    PS_STAT_USE_BINSIZE = 0x004000,         ///< Binsize
    54     PS_STAT_ROBUST_FOR_SAMPLE = 0x008000    ///< Robust for sample
     54    //    PS_STAT_ROBUST_FOR_SAMPLE = 0x008000    ///< Robust for sample
    5555} psStatsOptions;
    5656
     
    6060typedef struct
    6161{
    62     psF64 sampleMean;          ///< formal mean of sample
    63     psF64 sampleMedian;        ///< formal median of sample
    64     psF64 sampleStdev;         ///< standard deviation of sample
    65     psF64 sampleUQ;            ///< upper quartile of sample
    66     psF64 sampleLQ;            ///< lower quartile of sample
    67     psF64 robustMean;          ///< robust mean of array
    68     psF64 robustMedian;        ///< robust median of array
    69     psF64 robustMode;          ///< Robust mode of array
    70     psF64 robustStdev;         ///< robust standard deviation of array
    71     psF64 robustUQ;            ///< robust upper quartile
    72     psF64 robustLQ;            ///< robust lower quartile
    73     psS32 robustN50;           ///< Number of points in Gaussian fit.  XXX: This is currently never set.
    74     psS32 robustNfit;          ///< The number of points between the quartiles.
    75     psF64 clippedMean;         ///< Nsigma clipped mean
    76     psF64 clippedStdev;        ///< standard deviation after clipping
    77     psS32 clippedNvalues;      ///< Number of data points used for clipped mean:  This value is never used.
    78     psF64 clipSigma;           ///< Nsigma used for clipping; user input
    79     psS32 clipIter;            ///< Number of clipping iterations; user input
    80     psF64 min;                 ///< minimum data value in array
    81     psF64 max;                 ///< maximum data value in array
    82     psF64 binsize;             ///< binsize for robust fit (input/ouput)
    83     psStatsOptions options;    ///< bitmask of calculated values
     62    double sampleMean;                 ///< formal mean of sample
     63    double sampleMedian;               ///< formal median of sample
     64    double sampleStdev;                ///< standard deviation of sample
     65    double sampleUQ;                   ///< upper quartile of sample
     66    double sampleLQ;                   ///< lower quartile of sample
     67    double robustMean;                 ///< robust mean of array
     68    double robustMedian;               ///< robust median of array
     69    double robustMode;                 ///< Robust mode of array
     70    double robustStdev;                ///< robust standard deviation of array
     71    double robustUQ;                   ///< robust upper quartile
     72    double robustLQ;                   ///< robust lower quartile
     73    int robustN50;                     ///< Number of points in Gaussian fit.  XXX: This is currently never set.
     74    int robustNfit;                    ///< The number of points between the quartiles.
     75    double clippedMean;                ///< Nsigma clipped mean
     76    double clippedStdev;               ///< standard deviation after clipping
     77    int clippedNvalues;                ///< Number of data points used for clipped mean:  This value is never used.
     78    double clipSigma;                  ///< Nsigma used for clipping; user input
     79    int clipIter;                      ///< Number of clipping iterations; user input
     80    double min;                        ///< minimum data value in array
     81    double max;                        ///< maximum data value in array
     82    double binsize;                    ///< binsize for robust fit (input/ouput)
     83    psStatsOptions options;            ///< bitmask of calculated values
    8484}
    8585psStats;
     
    9090 */
    9191psStats* psVectorStats(
    92     psStats* stats,          ///< stats structure defines stats to be calculated and how
    93     const psVector* in,      ///< Vector to be analysed.
    94     const psVector* errors,  ///< Errors.
    95     const psVector* mask,    ///< Ignore elements where (maskVector & maskVal) != 0: must be INT or NULL
    96     psMaskType maskVal       ///< Only mask elements with one of these bits set in maskVector
     92    psStats* stats,                    ///< stats structure defines stats to be calculated and how
     93    const psVector* in,                ///< Vector to be analysed.
     94    const psVector* errors,            ///< Errors.
     95    const psVector* mask,              ///< Ignore elements where (maskVector & maskVal) != 0: must be INT or NULL
     96    psMaskType maskVal                 ///< Only mask elements with one of these bits set in maskVector
    9797);
    9898
     
    121121typedef struct
    122122{
    123     psVector* bounds;                  ///< Bounds for the bins (type F32)
     123    const psVector* bounds;            ///< Bounds for the bins (type F32)
    124124    psVector* nums;                    ///< Number in each of the bins (INT)
    125     psS32 minNum;                      ///< Number below the minimum
    126     psS32 maxNum;                      ///< Number above the maximum
    127     psBool uniform;                    ///< Is it a uniform distribution?
     125    int minNum;                        ///< Number below the minimum
     126    int maxNum;                        ///< Number above the maximum
     127    bool uniform;                      ///< Is it a uniform distribution?
    128128}
    129129psHistogram;
  • trunk/psLib/src/math/psUnaryOp.c

    r4409 r4540  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-28 20:17:52 $
     32 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-12 19:12:01 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151#include "psLogMsg.h"
    5252#include "psConstants.h"
    53 #include "psDataManipErrors.h"
     53#include "psErrorText.h"
    5454
    5555/*****************************************************************************
     
    304304}
    305305
    306 psPtr psUnaryOp(psPtr out, const psPtr in, const char *op)
     306psMathType* psUnaryOp(psPtr out, const psPtr in, const char *op)
    307307{
    308308    #define psUnaryOp_EXIT { \
  • trunk/psLib/src/math/psUnaryOp.h

    r4409 r4540  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-28 20:17:52 $
     32 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-12 19:12:01 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5959 *  @return  psType* : Pointer to either psImage or psVector.
    6060 */
    61 psType* psUnaryOp(
     61psMathType* psUnaryOp(
    6262    psPtr out,                         ///< Output type, either psImage or psVector.
    6363    const psPtr in,                    ///< Input, either psImage or psVector.
Note: See TracChangeset for help on using the changeset viewer.