Changeset 12458
- Timestamp:
- Mar 15, 2007, 2:33:55 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r12437 r12458 13 13 * use ->min and ->max (PS_STAT_USE_RANGE) 14 14 * 15 * @version $Revision: 1.20 2$ $Name: not supported by cvs2svn $16 * @date $Date: 2007-03-1 4 02:43:47$15 * @version $Revision: 1.203 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2007-03-16 00:33:55 $ 17 17 * 18 18 * Copyright 2006 IfA, University of Hawaii … … 69 69 // set the bin closest to the corresponding value. if USE_END is +/- 1, 70 70 // out-of-range saturates on lower/upper bin REGARDLESS of actual value 71 #define PS_BIN_FOR_VALUE(RESULT, VECTOR, VALUE, USE_END) \ 71 #define PS_BIN_FOR_VALUE(RESULT, VECTOR, VALUE, USE_END) { \ 72 psVectorBinaryDisectResult result; \ 73 psScalar tmpScalar; \ 74 tmpScalar.type.type = PS_TYPE_F32; \ 72 75 tmpScalar.data.F32 = (VALUE); \ 73 76 RESULT = psVectorBinaryDisect (&result, VECTOR, &tmpScalar); \ … … 84 87 psAbort ("programming error"); \ 85 88 break; \ 86 } 89 } } 87 90 88 91 # define PS_BIN_INTERPOLATE(RESULT, VECTOR, BOUNDS, BIN, VALUE) { \ … … 626 629 } 627 630 628 psVectorBinaryDisectResult result;629 psScalar tmpScalar; // Temporary scalar variable, for psVectorBinaryDisect630 tmpScalar.type.type = PS_TYPE_F32;631 632 631 // we need to generate an internal mask and maskVal which ensures a bit is set 633 632 // and tested even if there is no supplied mask (and/or the maskVal is 0) … … 920 919 float guessMean = stats->robustMedian; // pass the guess mean 921 920 922 psVectorBinaryDisectResult result;923 924 921 psTrace("psLib.math", 6, "The guess mean is %f.\n", guessMean); 925 922 psTrace("psLib.math", 6, "The guess stdev is %f.\n", guessStdev); … … 928 925 for (int iteration = 0; !done && (iteration < 2); iteration ++) { 929 926 psStats *statsMinMax = psStatsAlloc(PS_STAT_MIN | PS_STAT_MAX); // Statistics for min and max 930 931 psScalar tmpScalar; // Temporary scalar variable, for psVectorBinaryDisect932 tmpScalar.type.type = PS_TYPE_F32;933 927 934 928 psF32 binSize = 1; … … 1103 1097 float guessMean = stats->robustMedian; // pass the guess mean 1104 1098 1105 psVectorBinaryDisectResult result;1106 1099 psTrace("psLib.math", 6, "The ** starting ** guess mean is %f.\n", guessMean); 1107 1100 psTrace("psLib.math", 6, "The ** starting ** guess stdev is %f.\n", guessStdev); … … 1110 1103 for (int iteration = 0; !done && (iteration < 2); iteration ++) { 1111 1104 psStats *statsMinMax = psStatsAlloc(PS_STAT_MIN | PS_STAT_MAX); // Statistics for min and max 1112 1113 psScalar tmpScalar; // Temporary scalar variable, for psVectorBinaryDisect1114 tmpScalar.type.type = PS_TYPE_F32;1115 1105 1116 1106 psF32 binSize = 1; … … 1299 1289 float guessMean = stats->robustMedian; // pass the guess mean 1300 1290 1301 psVectorBinaryDisectResult result;1302 1291 psTrace("psLib.math", 6, "The ** starting ** guess mean is %f.\n", guessMean); 1303 1292 psTrace("psLib.math", 6, "The ** starting ** guess stdev is %f.\n", guessStdev); … … 1306 1295 for (int iteration = 0; !done && (iteration < 2); iteration ++) { 1307 1296 psStats *statsMinMax = psStatsAlloc(PS_STAT_MIN | PS_STAT_MAX); // Statistics for min and max 1308 1309 psScalar tmpScalar; // Temporary scalar variable, for psVectorBinaryDisect1310 tmpScalar.type.type = PS_TYPE_F32;1311 1297 1312 1298 psF32 binSize = 1;
Note:
See TracChangeset
for help on using the changeset viewer.
