Changeset 644
- Timestamp:
- May 11, 2004, 3:14:30 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
dataManip/psStats.h (modified) (8 diffs)
-
math/psStats.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psStats.h
r642 r644 80 80 PS_STAT_SAMPLE_MEDIAN = 0x000002, 81 81 PS_STAT_SAMPLE_STDEV = 0x000004, 82 PS_STAT_SAMPLE_UQ = 0x000008,83 PS_STAT_SAMPLE_LQ = 0x000010,82 PS_STAT_SAMPLE_UQ = 0x000008, 83 PS_STAT_SAMPLE_LQ = 0x000010, 84 84 PS_STAT_ROBUST_MEAN = 0x000020, 85 85 PS_STAT_ROBUST_MEAN_NVALUES = 0x000040, … … 89 89 PS_STAT_ROBUST_MODE_NVALUES = 0x000400, 90 90 PS_STAT_ROBUST_STDEV = 0x000800, 91 PS_STAT_ROBUST_UQ = 0x001000,92 PS_STAT_ROBUST_LQ = 0x002000,91 PS_STAT_ROBUST_UQ = 0x001000, 92 PS_STAT_ROBUST_LQ = 0x002000, 93 93 PS_STAT_CLIPPED_MEAN = 0x004000, 94 94 PS_STAT_CLIPPED_MEAN_NVALUES = 0x008000, 95 95 PS_STAT_CLIPPED_MEAN_NSIGMA = 0x010000, 96 96 PS_STAT_CLIPPED_STDEV = 0x020000, 97 PS_STAT_MAX = 0x040000,98 PS_STAT_MIN = 0x080000,99 PS_STAT_NVALUES = 0x10000097 PS_STAT_MAX = 0x040000, 98 PS_STAT_MIN = 0x080000, 99 PS_STAT_NVALUES = 0x100000 100 100 } psStatsOptions; 101 101 … … 104 104 typedef struct 105 105 { 106 double sampleMean; ///< formal mean of sample107 double sampleMedian; ///< formal median of sample108 double sampleStdev; ///< standard deviation of sample109 double sampleUQ; ///< upper quartile of sample110 double sampleLQ; ///< lower quartile of sample111 double robustMean; ///< robust mean of array112 int robustMeanNvalues; ///< number of measurements used for robust mean113 double robustMedian; ///< robust median of array114 int robustMedianNvalues; ///< number of measurements used for robust median115 double robustMode; ///< Robust mode of array116 int robustModeNvalues; ///< Number of measurements used for robust mode117 double robustStdev; ///< robust standard deviation of array118 double robustUQ; ///< robust upper quartile119 double robustLQ; ///< robust lower quartile120 double clippedMean; ///< Nsigma clipped mean106 double sampleMean; ///< formal mean of sample 107 double sampleMedian; ///< formal median of sample 108 double sampleStdev; ///< standard deviation of sample 109 double sampleUQ; ///< upper quartile of sample 110 double sampleLQ; ///< lower quartile of sample 111 double robustMean; ///< robust mean of array 112 int robustMeanNvalues; ///< number of measurements used for robust mean 113 double robustMedian; ///< robust median of array 114 int robustMedianNvalues; ///< number of measurements used for robust median 115 double robustMode; ///< Robust mode of array 116 int robustModeNvalues; ///< Number of measurements used for robust mode 117 double robustStdev; ///< robust standard deviation of array 118 double robustUQ; ///< robust upper quartile 119 double robustLQ; ///< robust lower quartile 120 double clippedMean; ///< Nsigma clipped mean 121 121 int clippedMeanNvalues; ///< number of data points used for clipped mean 122 double clippedStdev; ///< standard deviation after clipping123 double clipSigma; ///< Nsigma used for clipping; user input124 int clipIter; ///< Number of clipping iterations; user input125 double min; ///< minimum data value in array126 double max; ///< maximum data value in array127 int nValues; ///< number of data values in array128 psStatsOptions options; ///< bitmask of calculated values122 double clippedStdev; ///< standard deviation after clipping 123 double clipSigma; ///< Nsigma used for clipping; user input 124 int clipIter; ///< Number of clipping iterations; user input 125 double min; ///< minimum data value in array 126 double max; ///< maximum data value in array 127 int nValues; ///< number of data values in array 128 psStatsOptions options; ///< bitmask of calculated values 129 129 } 130 130 psStats; … … 151 151 ); 152 152 153 /***********************************************************************************************************/154 155 153 /** Histograms */ 156 154 typedef struct … … 158 156 const psVector *restrict lower; ///< Lower bounds for the bins (FLOAT) 159 157 const psVector *restrict upper; ///< Upper bounds for the bins (FLOAT) 160 psVector *nums; ///< Number in each of the bins (INT)158 psVector *nums; ///< Number in each of the bins (INT) 161 159 float minVal; 162 float maxVal; ///< Minimum and maximum values160 float maxVal; ///< Minimum and maximum values 163 161 int minNum; 164 int maxNum; ///< Number below the minimum and above the maximum162 int maxNum; ///< Number below the minimum and above the maximum 165 163 } 166 164 psHistogram; … … 170 168 psHistogramAlloc(float lower, ///< Lower limit for the bins 171 169 float upper, ///< Upper limit for the bins 172 float size ///< Size of the bins170 float size ///< Size of the bins 173 171 ); 174 172 … … 177 175 psHistogramAllocGeneric(const psVector *restrict lower, ///< Lower bounds for the bins 178 176 const psVector *restrict upper, ///< Upper bounds for the bins 179 float minVal, ///< Minimum value180 float maxVal ///< Maximum value177 float minVal, ///< Minimum value 178 float maxVal ///< Maximum value 181 179 ); 182 180 183 181 /** Destructor \ingroup MathGroup **/ 184 182 void 185 psHistogramFree(psHistogram *restrict myHist ///< Histogram to destroy183 psHistogramFree(psHistogram *restrict myHist ///< Histogram to destroy 186 184 ); 187 185 … … 189 187 /** Calculate a histogram \ingroup MathGroup **/ 190 188 psHistogram * 191 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data189 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data 192 190 const psVector *restrict myVector ///< Vector to analyse 193 191 ); -
trunk/psLib/src/math/psStats.h
r642 r644 80 80 PS_STAT_SAMPLE_MEDIAN = 0x000002, 81 81 PS_STAT_SAMPLE_STDEV = 0x000004, 82 PS_STAT_SAMPLE_UQ = 0x000008,83 PS_STAT_SAMPLE_LQ = 0x000010,82 PS_STAT_SAMPLE_UQ = 0x000008, 83 PS_STAT_SAMPLE_LQ = 0x000010, 84 84 PS_STAT_ROBUST_MEAN = 0x000020, 85 85 PS_STAT_ROBUST_MEAN_NVALUES = 0x000040, … … 89 89 PS_STAT_ROBUST_MODE_NVALUES = 0x000400, 90 90 PS_STAT_ROBUST_STDEV = 0x000800, 91 PS_STAT_ROBUST_UQ = 0x001000,92 PS_STAT_ROBUST_LQ = 0x002000,91 PS_STAT_ROBUST_UQ = 0x001000, 92 PS_STAT_ROBUST_LQ = 0x002000, 93 93 PS_STAT_CLIPPED_MEAN = 0x004000, 94 94 PS_STAT_CLIPPED_MEAN_NVALUES = 0x008000, 95 95 PS_STAT_CLIPPED_MEAN_NSIGMA = 0x010000, 96 96 PS_STAT_CLIPPED_STDEV = 0x020000, 97 PS_STAT_MAX = 0x040000,98 PS_STAT_MIN = 0x080000,99 PS_STAT_NVALUES = 0x10000097 PS_STAT_MAX = 0x040000, 98 PS_STAT_MIN = 0x080000, 99 PS_STAT_NVALUES = 0x100000 100 100 } psStatsOptions; 101 101 … … 104 104 typedef struct 105 105 { 106 double sampleMean; ///< formal mean of sample107 double sampleMedian; ///< formal median of sample108 double sampleStdev; ///< standard deviation of sample109 double sampleUQ; ///< upper quartile of sample110 double sampleLQ; ///< lower quartile of sample111 double robustMean; ///< robust mean of array112 int robustMeanNvalues; ///< number of measurements used for robust mean113 double robustMedian; ///< robust median of array114 int robustMedianNvalues; ///< number of measurements used for robust median115 double robustMode; ///< Robust mode of array116 int robustModeNvalues; ///< Number of measurements used for robust mode117 double robustStdev; ///< robust standard deviation of array118 double robustUQ; ///< robust upper quartile119 double robustLQ; ///< robust lower quartile120 double clippedMean; ///< Nsigma clipped mean106 double sampleMean; ///< formal mean of sample 107 double sampleMedian; ///< formal median of sample 108 double sampleStdev; ///< standard deviation of sample 109 double sampleUQ; ///< upper quartile of sample 110 double sampleLQ; ///< lower quartile of sample 111 double robustMean; ///< robust mean of array 112 int robustMeanNvalues; ///< number of measurements used for robust mean 113 double robustMedian; ///< robust median of array 114 int robustMedianNvalues; ///< number of measurements used for robust median 115 double robustMode; ///< Robust mode of array 116 int robustModeNvalues; ///< Number of measurements used for robust mode 117 double robustStdev; ///< robust standard deviation of array 118 double robustUQ; ///< robust upper quartile 119 double robustLQ; ///< robust lower quartile 120 double clippedMean; ///< Nsigma clipped mean 121 121 int clippedMeanNvalues; ///< number of data points used for clipped mean 122 double clippedStdev; ///< standard deviation after clipping123 double clipSigma; ///< Nsigma used for clipping; user input124 int clipIter; ///< Number of clipping iterations; user input125 double min; ///< minimum data value in array126 double max; ///< maximum data value in array127 int nValues; ///< number of data values in array128 psStatsOptions options; ///< bitmask of calculated values122 double clippedStdev; ///< standard deviation after clipping 123 double clipSigma; ///< Nsigma used for clipping; user input 124 int clipIter; ///< Number of clipping iterations; user input 125 double min; ///< minimum data value in array 126 double max; ///< maximum data value in array 127 int nValues; ///< number of data values in array 128 psStatsOptions options; ///< bitmask of calculated values 129 129 } 130 130 psStats; … … 151 151 ); 152 152 153 /***********************************************************************************************************/154 155 153 /** Histograms */ 156 154 typedef struct … … 158 156 const psVector *restrict lower; ///< Lower bounds for the bins (FLOAT) 159 157 const psVector *restrict upper; ///< Upper bounds for the bins (FLOAT) 160 psVector *nums; ///< Number in each of the bins (INT)158 psVector *nums; ///< Number in each of the bins (INT) 161 159 float minVal; 162 float maxVal; ///< Minimum and maximum values160 float maxVal; ///< Minimum and maximum values 163 161 int minNum; 164 int maxNum; ///< Number below the minimum and above the maximum162 int maxNum; ///< Number below the minimum and above the maximum 165 163 } 166 164 psHistogram; … … 170 168 psHistogramAlloc(float lower, ///< Lower limit for the bins 171 169 float upper, ///< Upper limit for the bins 172 float size ///< Size of the bins170 float size ///< Size of the bins 173 171 ); 174 172 … … 177 175 psHistogramAllocGeneric(const psVector *restrict lower, ///< Lower bounds for the bins 178 176 const psVector *restrict upper, ///< Upper bounds for the bins 179 float minVal, ///< Minimum value180 float maxVal ///< Maximum value177 float minVal, ///< Minimum value 178 float maxVal ///< Maximum value 181 179 ); 182 180 183 181 /** Destructor \ingroup MathGroup **/ 184 182 void 185 psHistogramFree(psHistogram *restrict myHist ///< Histogram to destroy183 psHistogramFree(psHistogram *restrict myHist ///< Histogram to destroy 186 184 ); 187 185 … … 189 187 /** Calculate a histogram \ingroup MathGroup **/ 190 188 psHistogram * 191 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data189 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data 192 190 const psVector *restrict myVector ///< Vector to analyse 193 191 );
Note:
See TracChangeset
for help on using the changeset viewer.
