Changeset 153 for trunk/archive/pslib/include/psStats.h
- Timestamp:
- Mar 9, 2004, 12:28:16 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psStats.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psStats.h
r149 r153 5 5 #include "psStdArrays.h" 6 6 7 /* Do Statistics on an array. Returns a status value. */7 /** Do Statistics on an array. Returns a status value. */ 8 8 int 9 psArrayStats(const psFloatArray *restrict myArray, // Array to be analysed10 const psIntArray *restrict maskArray, // Ignore elements where (maskArray & maskVal) != 011 // May be NULL12 unsigned int maskVal, // Only mask elements with one of these bits set in maskArray13 int numIter, // Number of clipping iterations (0 not to clip)14 float numSD, // Number of s.d. to clip at15 float *restrict mean, // Mean of array (or NULL)16 float *restrict sd, // Standard deviation (or NULL)17 float *restrict med // Median (or NULL)9 psArrayStats(const psFloatArray *restrict myArray, //!< Array to be analysed 10 const psIntArray *restrict maskArray, //!< Ignore elements where (maskArray & maskVal) != 0 11 //!< May be NULL 12 unsigned int maskVal, //!< Only mask elements with one of these bits set in maskArray 13 int numIter, //!< Number of clipping iterations (0 not to clip) 14 float numSD, //!< Number of s.d. to clip at 15 float *restrict mean, //!< Mean of array (or NULL) 16 float *restrict sd, //!< Standard deviation (or NULL) 17 float *restrict med //!< Median (or NULL) 18 18 ); 19 19 20 20 /***********************************************************************************************************/ 21 21 22 /* Histograms */22 /** Histograms */ 23 23 typedef struct { 24 const psFloatArray *restrict lower, *restrict upper; // Lower and upper bounds for the bins25 psIntArray *nums; // Number in each of the bins26 const float minVal, maxVal; // Minimum and maximum values27 int minNum, maxNum; // Number below the minimum and above the maximum24 const psFloatArray *restrict lower, *restrict upper; //!< Lower and upper bounds for the bins 25 psIntArray *nums; //!< Number in each of the bins 26 const float minVal, maxVal; //!< Minimum and maximum values 27 int minNum, maxNum; //!< Number below the minimum and above the maximum 28 28 } psHistogram; 29 29 30 30 31 /* Constructor */31 /** Constructor */ 32 32 psHistogram * 33 psHistogramNew(float lower, // Lower limit for the bins34 float upper, // Upper limit for the bins35 float size // Size of the bins33 psHistogramNew(float lower, //!< Lower limit for the bins 34 float upper, //!< Upper limit for the bins 35 float size //!< Size of the bins 36 36 ); 37 37 38 /* Generic constructor */38 /** Generic constructor */ 39 39 psHistogram * 40 psHistogramNewGeneric(const psFloatArray *restrict lower, // Lower bounds for the bins41 const psFloatArray *restrict upper, // Upper bounds for the bins42 float minVal, // Minimum value43 float maxVal // Maximum value40 psHistogramNewGeneric(const psFloatArray *restrict lower, //!< Lower bounds for the bins 41 const psFloatArray *restrict upper, //!< Upper bounds for the bins 42 float minVal, //!< Minimum value 43 float maxVal //!< Maximum value 44 44 ); 45 45 46 /* Destructor */46 /** Destructor */ 47 47 void 48 psHistogramDel(psHistogram *restrict myHist // Histogram to destroy48 psHistogramDel(psHistogram *restrict myHist //!< Histogram to destroy 49 49 ); 50 50 51 51 52 /* Calculate a histogram */52 /** Calculate a histogram */ 53 53 psHistogram * 54 psGetArrayHistogram(psHistogram *restrict myHist, // Histogram data55 const psFloatArray *restrict myArray // Array to analyse54 psGetArrayHistogram(psHistogram *restrict myHist, //!< Histogram data 55 const psFloatArray *restrict myArray //!< Array to analyse 56 56 ); 57 57
Note:
See TracChangeset
for help on using the changeset viewer.
