Changeset 4540 for trunk/psLib/src/math
- Timestamp:
- Jul 12, 2005, 9:12:01 AM (21 years ago)
- Location:
- trunk/psLib/src/math
- Files:
-
- 3 added
- 4 deleted
- 11 edited
-
Makefile.am (modified) (1 diff)
-
math.i (added)
-
psBinaryOp.c (modified) (3 diffs)
-
psBinaryOp.h (modified) (2 diffs)
-
psFunctions.c (added)
-
psFunctions.h (added)
-
psMatrix.c (modified) (2 diffs)
-
psMinimize.c (modified) (8 diffs)
-
psMinimize.h (modified) (14 diffs)
-
psPolynomial.c (deleted)
-
psPolynomial.h (deleted)
-
psRandom.c (modified) (2 diffs)
-
psSpline.c (deleted)
-
psSpline.h (deleted)
-
psStats.c (modified) (11 diffs)
-
psStats.h (modified) (5 diffs)
-
psUnaryOp.c (modified) (3 diffs)
-
psUnaryOp.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/Makefile.am
r4446 r4540 1 #Makefile for dataManipfunctions of psLib1 #Makefile for math functions of psLib 2 2 # 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) 3 noinst_LTLIBRARIES = libpslibmath.la 15 4 16 noinst_LTLIBRARIES = libpslibdataManip.la 5 libpslibmath_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 17 14 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=$? $@ 15 EXTRA_DIST = math.i 26 16 27 17 pslibincludedir = $(includedir) 28 18 pslibinclude_HEADERS = \ 19 psBinaryOp.h \ 20 psCompare.h \ 29 21 psConstants.h \ 30 psStats.h \ 22 psMatrix.h \ 23 psMinimize.h \ 24 psRandom.h \ 31 25 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 30 30 * @author Robert DeSonia, MHPCC 31 31 * 32 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $33 * @date $Date: 2005-0 6-22 02:05:41 $32 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 33 * @date $Date: 2005-07-12 19:12:01 $ 34 34 * 35 35 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 50 50 #include "psLogMsg.h" 51 51 #include "psConstants.h" 52 #include "ps DataManipErrors.h"52 #include "psErrorText.h" 53 53 54 54 /***************************************************************************** … … 426 426 } 427 427 428 ps PtrpsBinaryOp(psPtr out, const psPtr in1, const char *op, const psPtr in2)428 psMathType* psBinaryOp(psPtr out, const psPtr in1, const char *op, const psPtr in2) 429 429 { 430 430 -
trunk/psLib/src/math/psBinaryOp.h
r4342 r4540 30 30 * @author Robert DeSonia, MHPCC 31 31 * 32 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $33 * @date $Date: 2005-0 6-22 02:05:41 $32 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 33 * @date $Date: 2005-07-12 19:12:01 $ 34 34 * 35 35 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 55 55 * @return psType* : Pointer to either psImage or psVector. 56 56 */ 57 ps Type* psBinaryOp(57 psMathType* psBinaryOp( 58 58 psPtr out, ///< Output type, either psImage or psVector. 59 59 const psPtr in1, ///< First input, either psImage or psVector. -
trunk/psLib/src/math/psMatrix.c
r4388 r4540 21 21 * @author Robert DeSonia, MHPCC 22 22 * 23 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-0 6-25 01:15:01 $23 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-07-12 19:12:01 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 43 43 #include "psMatrix.h" 44 44 #include "psConstants.h" 45 #include "ps DataManipErrors.h"45 #include "psErrorText.h" 46 46 47 47 -
trunk/psLib/src/math/psMinimize.c
r4321 r4540 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.12 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 6-20 22:42:30$11 * @version $Revision: 1.124 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-07-12 19:12:01 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1357 1357 XXX: type F32 is done via vector conversion only. 1358 1358 *****************************************************************************/ 1359 psPolynomial1D* psVectorFitPolynomial1D(psPolynomial1D* myPoly,1359 psPolynomial1D* psVectorFitPolynomial1D(psPolynomial1D* poly, 1360 1360 const psVector* x, 1361 1361 const psVector* y, 1362 1362 const psVector* yErr) 1363 1363 { 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); 1366 1366 PS_ASSERT_VECTOR_NON_NULL(y, NULL); 1367 1367 PS_ASSERT_VECTOR_NON_EMPTY(y, NULL); … … 1389 1389 if (x == NULL) { 1390 1390 PS_VECTOR_GEN_X_INDEX_STATIC_F64(x64Static, y->n); 1391 if ( myPoly->type == PS_POLYNOMIAL_CHEB) {1391 if (poly->type == PS_POLYNOMIAL_CHEB) { 1392 1392 p_psNormalizeVectorRangeF64(x64Static, -1.0, 1.0); 1393 1393 } … … 1396 1396 PS_ASSERT_VECTOR_TYPE_F32_OR_F64(x, NULL); 1397 1397 PS_VECTOR_CONVERT_F32_TO_F64_STATIC(x, x64, x64Static); 1398 if ( myPoly->type == PS_POLYNOMIAL_CHEB) {1398 if (poly->type == PS_POLYNOMIAL_CHEB) { 1399 1399 p_psNormalizeVectorRangeF64(x64, -1.0, 1.0); 1400 1400 } … … 1405 1405 // Call the appropriate vector fitting routine. 1406 1406 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); 1411 1411 } else { 1412 1412 psError(PS_ERR_BAD_PARAMETER_VALUE, true, … … 1419 1419 } 1420 1420 1421 return( myPoly);1421 return(poly); 1422 1422 } 1423 1423 … … 1432 1432 1433 1433 psMinimization *min = psAlloc(sizeof(psMinimization)); 1434 min->maxIter = maxIter;1435 min->tol = tol;1434 *(int*)&min->maxIter = maxIter; 1435 *(float*)&min->tol = tol; 1436 1436 min->value = 0.0; 1437 1437 min->iter = 0; … … 1993 1993 for (i=0;i<numDims;i++) { 1994 1994 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; 1997 1997 mul = p_psLineMin(&dummyMin, 1998 1998 Q, -
trunk/psLib/src/math/psMinimize.h
r4330 r4540 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.4 8$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-0 6-21 03:01:37$10 * @version $Revision: 1.49 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-07-12 19:12:01 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 38 38 39 39 /** A data structure for minimization routines. 40 * 40 * 41 41 * Contains numerical analysis parameters/values 42 42 */ 43 43 typedef struct 44 44 { 45 psS32 maxIter;///< Convergence limit46 psF32 tol;///< Error Tolerance47 psF32value; ///< Value of function at minimum48 psS32 iter;///< Number of iterations to date49 psF32lastDelta; ///< The last difference for the fit45 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 50 50 } 51 51 psMinimization; 52 52 53 53 /** Allocates a psMinimization structure. 54 * 54 * 55 55 * @return psMinimization* : a new psMinimization struct 56 56 */ … … 74 74 */ 75 75 psPolynomial1D* psVectorFitPolynomial1D( 76 psPolynomial1D* myPoly, ///< Polynomial to fit76 psPolynomial1D* poly, ///< Polynomial to fit 77 77 const psVector* x, ///< Ordinates (or NULL to just use the indices) 78 78 const psVector* y, ///< Coordinates … … 81 81 82 82 /** 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 85 85 * generates the linear splines which satisfy those data points. 86 * 86 * 87 87 * @return psSpline1D*: the calculated one-dimensional splines 88 88 */ … … 96 96 /** Specifies the format of a user-defined function that the general Levenberg- 97 97 * 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, 100 100 * positions, and derivatives. 101 101 */ 102 102 typedef 103 psF64(*psMinimizeLMChi2Func)(103 float (*psMinimizeLMChi2Func)( 104 104 psVector *deriv, ///< derivatives of the function 105 psVector *params,///< the parameters used to evaluate the function106 psVector *x///< positions for evaluation105 const psVector *params, ///< the parameters used to evaluate the function 106 const psVector *x ///< positions for evaluation 107 107 ); 108 108 109 109 /** Minimizes a specified function based on the Levenberg-Marquardt method. 110 * 110 * 111 111 * @return bool: True if successful. 112 112 */ … … 123 123 124 124 /** Use specified alpha, beta, params to generate a new guess for Alpha, Beta, Params 125 * 125 * 126 126 * @return psBool: True if successful. 127 127 */ … … 138 138 139 139 /** Function used to set parameters for generating "best guess" in minimizing Chi-Squared value. 140 * 140 * 141 141 * @return psF64: Chi-squared value for new guess 142 142 */ … … 153 153 /** Specifies the format of a user-defined function that the general Powell 154 154 * minimizer routine will accept. 155 * 156 * @return psF32: the single float value of the function given the parameters155 * 156 * @return float: the single float value of the function given the parameters 157 157 * and coordinate vectors. 158 158 */ 159 159 typedef 160 psF32(*psMinimizePowellFunc)(160 float (*psMinimizePowellFunc)( 161 161 const psVector *params, ///< Parameters used to evaluate the function 162 162 const psArray *coords ///< Coordinates at which to evaluate … … 164 164 165 165 /** Minimizes a specified function based on the Powell method. 166 * 166 * 167 167 * @return bool: True if successful. 168 168 */ … … 177 177 /** Calculates the one-dimensional Gaussian in a format acceptable to the Levenberg- 178 178 * Marquardt minimizer routine. 179 * 179 * 180 180 * @return psVector*: Calculated values 181 181 */ … … 188 188 /** Calculates the one-dimensional Gaussian in a format acceptable to the Powell 189 189 * chi-squared minimizer routine. 190 * 190 * 191 191 * @return psVector*: Calculated values 192 192 */ … … 198 198 /** Specifies the format of a user-defined function that the general Powell chi- 199 199 * squared minimizer routine will accept. 200 * 200 * 201 201 * @return psVector*: Calculated values given the parameters and coordinates. 202 202 */ … … 208 208 209 209 /** Minimizes a specified function based on the Powell chi-squared method. 210 * 210 * 211 211 * @return bool: True is successful. 212 212 */ … … 222 222 223 223 /** Gauss-Jordan numerical solver. 224 * 224 * 225 225 * @return bool: True if successful. 226 226 */ -
trunk/psLib/src/math/psRandom.c
r4330 r4540 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 6-21 03:01:37$12 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-07-12 19:12:01 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 31 #include "psLogMsg.h" 32 32 #include "psConstants.h" 33 #include "ps DataManipErrors.h"33 #include "psErrorText.h" 34 34 35 35 psU64 p_psRandomGetSystemSeed() -
trunk/psLib/src/math/psStats.c
r4409 r4540 14 14 * stats->binsize 15 15 * 16 * @version $Revision: 1.13 6$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-0 6-28 20:17:52$16 * @version $Revision: 1.137 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-07-12 19:12:01 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 41 41 #include "psConstants.h" 42 42 43 #include "ps DataManipErrors.h"43 #include "psErrorText.h" 44 44 45 45 /*****************************************************************************/ … … 77 77 psBool p_psGetStatValue(const psStats* stats, psF64 *value) 78 78 { 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)) { 80 81 case PS_STAT_SAMPLE_MEAN: 81 82 *value = stats->sampleMean; … … 658 659 x.data.F32 = iMid - (PS_GAUSS_WIDTH * sigma); 659 660 if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) { 660 jMin = p_psVectorBinDisect( robustHistogram->bounds, &x);661 jMin = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x); 661 662 if (jMin < 0) { 662 663 psError(PS_ERR_UNEXPECTED_NULL, … … 673 674 x.data.F32 = iMid + (PS_GAUSS_WIDTH * sigma); 674 675 if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) { 675 jMax = p_psVectorBinDisect( robustHistogram->bounds, &x);676 jMax = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x); 676 677 if (jMax < 0) { 677 678 psError(PS_ERR_UNEXPECTED_NULL, … … 1705 1706 //Determine id that is okay. 1706 1707 stats->robustMedian = fitQuadraticSearchForYThenReturnX( 1707 robustHistogram->bounds,1708 *(psVector* *)&robustHistogram->bounds, 1708 1709 cumulativeRobustSums, 1709 1710 medianBinNum, … … 1721 1722 //Determine id that is okay. 1722 1723 stats->robustLQ = fitQuadraticSearchForYThenReturnX( 1723 robustHistogram->bounds,1724 *(psVector* *)&robustHistogram->bounds, 1724 1725 cumulativeRobustSums, 1725 1726 LQBinNum, … … 1728 1729 //Determine id that is okay. 1729 1730 stats->robustUQ = fitQuadraticSearchForYThenReturnX( 1730 robustHistogram->bounds,1731 *(psVector* *)&robustHistogram->bounds, 1731 1732 cumulativeRobustSums, 1732 1733 UQBinNum, … … 1812 1813 psMemSetDeallocator(newHist, (psFreeFunc) histogramFree); 1813 1814 newHist->bounds = psVectorAlloc(n + 1, PS_TYPE_F32); 1814 newHist->bounds->n = newHist->bounds->nalloc;1815 *(int *)&newHist->bounds->n = newHist->bounds->nalloc; 1815 1816 1816 1817 // Calculate the bounds for each bin. … … 1859 1860 psMemSetDeallocator(newHist, (psFreeFunc) histogramFree); 1860 1861 newHist->bounds = psVectorAlloc(bounds->n, PS_TYPE_F32); 1861 newHist->bounds->n = newHist->bounds->nalloc;1862 *(int *)&newHist->bounds->n = newHist->bounds->nalloc; 1862 1863 for (i = 0; i < bounds->n; i++) { 1863 1864 newHist->bounds->data.F32[i] = bounds->data.F32[i]; … … 2067 2068 // correct bin number requires a bit more work. 2068 2069 tmpScalar.data.F32 = inF32->data.F32[i]; 2069 binNum = p_psVectorBinDisect( out->bounds, &tmpScalar);2070 binNum = p_psVectorBinDisect( *(psVector* *)&out->bounds, &tmpScalar); 2070 2071 if (binNum < 0) { 2071 2072 psLogMsg(__func__, PS_LOG_WARN, -
trunk/psLib/src/math/psStats.h
r4409 r4540 14 14 * @author GLG, MHPCC 15 15 * 16 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-0 6-28 20:17:52$16 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-07-12 19:12:01 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 52 52 PS_STAT_USE_RANGE = 0x002000, ///< Range 53 53 PS_STAT_USE_BINSIZE = 0x004000, ///< Binsize 54 PS_STAT_ROBUST_FOR_SAMPLE = 0x008000 ///< Robust for sample54 // PS_STAT_ROBUST_FOR_SAMPLE = 0x008000 ///< Robust for sample 55 55 } psStatsOptions; 56 56 … … 60 60 typedef struct 61 61 { 62 psF64 sampleMean;///< formal mean of sample63 psF64 sampleMedian;///< formal median of sample64 psF64 sampleStdev;///< standard deviation of sample65 psF64 sampleUQ;///< upper quartile of sample66 psF64 sampleLQ;///< lower quartile of sample67 psF64 robustMean;///< robust mean of array68 psF64 robustMedian;///< robust median of array69 psF64 robustMode;///< Robust mode of array70 psF64 robustStdev;///< robust standard deviation of array71 psF64 robustUQ;///< robust upper quartile72 psF64 robustLQ;///< robust lower quartile73 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 mean76 psF64 clippedStdev;///< standard deviation after clipping77 psS32 clippedNvalues;///< Number of data points used for clipped mean: This value is never used.78 psF64 clipSigma;///< Nsigma used for clipping; user input79 psS32 clipIter;///< Number of clipping iterations; user input80 psF64 min;///< minimum data value in array81 psF64 max;///< maximum data value in array82 psF64 binsize;///< binsize for robust fit (input/ouput)83 psStatsOptions options; ///< bitmask of calculated values62 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 84 84 } 85 85 psStats; … … 90 90 */ 91 91 psStats* psVectorStats( 92 psStats* stats, ///< stats structure defines stats to be calculated and how93 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 NULL96 psMaskType maskVal ///< Only mask elements with one of these bits set in maskVector92 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 97 97 ); 98 98 … … 121 121 typedef struct 122 122 { 123 psVector* bounds;///< Bounds for the bins (type F32)123 const psVector* bounds; ///< Bounds for the bins (type F32) 124 124 psVector* nums; ///< Number in each of the bins (INT) 125 psS32 minNum;///< Number below the minimum126 psS32 maxNum;///< Number above the maximum127 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? 128 128 } 129 129 psHistogram; -
trunk/psLib/src/math/psUnaryOp.c
r4409 r4540 30 30 * @author Robert DeSonia, MHPCC 31 31 * 32 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $33 * @date $Date: 2005-0 6-28 20:17:52$32 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 33 * @date $Date: 2005-07-12 19:12:01 $ 34 34 * 35 35 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 #include "psLogMsg.h" 52 52 #include "psConstants.h" 53 #include "ps DataManipErrors.h"53 #include "psErrorText.h" 54 54 55 55 /***************************************************************************** … … 304 304 } 305 305 306 ps PtrpsUnaryOp(psPtr out, const psPtr in, const char *op)306 psMathType* psUnaryOp(psPtr out, const psPtr in, const char *op) 307 307 { 308 308 #define psUnaryOp_EXIT { \ -
trunk/psLib/src/math/psUnaryOp.h
r4409 r4540 30 30 * @author Robert DeSonia, MHPCC 31 31 * 32 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $33 * @date $Date: 2005-0 6-28 20:17:52$32 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 33 * @date $Date: 2005-07-12 19:12:01 $ 34 34 * 35 35 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 59 59 * @return psType* : Pointer to either psImage or psVector. 60 60 */ 61 ps Type* psUnaryOp(61 psMathType* psUnaryOp( 62 62 psPtr out, ///< Output type, either psImage or psVector. 63 63 const psPtr in, ///< Input, either psImage or psVector.
Note:
See TracChangeset
for help on using the changeset viewer.
