Changeset 13647 for trunk/psLib/src/math/psStats.c
- Timestamp:
- Jun 5, 2007, 11:13:14 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r13494 r13647 13 13 * use ->min and ->max (PS_STAT_USE_RANGE) 14 14 * 15 * @version $Revision: 1.21 1$ $Name: not supported by cvs2svn $16 * @date $Date: 2007-0 5-24 02:06:51$15 * @version $Revision: 1.212 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2007-06-05 21:13:14 $ 17 17 * 18 18 * Copyright 2006 IfA, University of Hawaii … … 259 259 for (long i = 0; i < num; i++) { 260 260 // Check if the data is with the specified range 261 if (!isfinite(vector[i])) { 261 if (maskData && (maskData[i] & maskVal)) { 262 continue; 263 } 264 265 if (useRange) { 266 if (vector[i] < stats->min || vector[i] > stats->max) { 267 continue; 268 } 269 } else if (!isfinite(vector[i])) { 262 270 stats->max = stats->min = NAN; 263 271 psError(PS_ERR_IEEE, true, "Element %ld of vector is Inf/NaN", i); … … 265 273 } 266 274 267 if (useRange && (vector[i] < stats->min))268 continue;269 if (useRange && (vector[i] > stats->max))270 continue;271 if (maskData && (maskData[i] & maskVal))272 continue;273 275 numValid++; 274 276 max = PS_MAX (vector[i], max);
Note:
See TracChangeset
for help on using the changeset viewer.
