Changeset 3374 for trunk/psLib/src/math/psStats.c
- Timestamp:
- Mar 4, 2005, 10:51:20 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r3355 r3374 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.11 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-03-0 1 22:21:34$11 * @version $Revision: 1.118 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-03-04 20:51:20 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1006 1006 1007 1007 XXX: Use static vectors for tmpMask. 1008 1009 XXX: This has not been tested. 1008 1010 *****************************************************************************/ 1009 1011 psS32 p_psVectorClippedStats(const psVector* myVector, … … 1016 1018 psF32 clippedStdev = 0.0; // self-explanatory 1017 1019 psVector* tmpMask = NULL; // Temporary vector for masks during iterations. 1018 psStats *statsTmp = NULL; // Temporary psStats struct.1020 static psStats *statsTmp = NULL; // Temporary psStats struct. 1019 1021 psS32 rc = 0; // Return code. 1020 1022 … … 1040 1042 // However, we do no want to modify the original mask vector. 1041 1043 tmpMask = psVectorAlloc(myVector->n, PS_TYPE_U8); 1044 PS_VECTOR_SET_U8(tmpMask, 0); 1042 1045 1043 1046 // If we were called with a mask vector, then initialize the temporary … … 1068 1071 1069 1072 // 3. Use the sample median as the first estimator of the mean X. 1070 clippedMean = statsTmp->sampleMe an;1073 clippedMean = statsTmp->sampleMedian; 1071 1074 1072 1075 // 4. Use the sample stdev as the first estimator of the mean stdev.
Note:
See TracChangeset
for help on using the changeset viewer.
