Changeset 2268 for trunk/psLib/src/math/psStats.c
- Timestamp:
- Nov 2, 2004, 9:13:03 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r2251 r2268 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.8 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-11-02 00:07:49$11 * @version $Revision: 1.83 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-11-02 19:13:03 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 158 158 159 159 void p_psVectorSampleMean(const psVector* restrict myVector, 160 const psVector* restrict maskVector, psU32 maskVal, psStats* stats) 161 { 162 psS32 i = 0; // Loop index variable 160 const psVector* restrict maskVector, 161 psU32 maskVal, 162 psStats* stats) 163 { 164 psS32 i = 0; // Loop index variable 163 165 float mean = 0.0; // The mean 164 psS32 count = 0; // # of points in this mean?166 psS32 count = 0; // # of points in this mean 165 167 float rangeMin = 0.0; // Exclude data below this 166 168 float rangeMax = 0.0; // Exclude date above this … … 175 177 // Check if the data is with the specified range 176 178 if (!(maskVal & maskVector->data.U8[i]) && 177 (rangeMin <= myVector->data.F32[i]) && (myVector->data.F32[i] <= rangeMax)) { 179 (rangeMin <= myVector->data.F32[i]) && 180 (myVector->data.F32[i] <= rangeMax)) { 178 181 mean += myVector->data.F32[i]; 179 182 count++; … … 222 225 *****************************************************************************/ 223 226 void p_psVectorMax(const psVector* restrict myVector, 224 const psVector* restrict maskVector, psU32 maskVal, psStats* stats) 225 { 226 psS32 i = 0; // Loop index variable 227 const psVector* restrict maskVector, 228 psU32 maskVal, 229 psStats* stats) 230 { 231 psS32 i = 0; // Loop index variable 227 232 float max = -PS_MAX_FLOAT; // The calculated maximum 228 233 float rangeMin = 0.0; // Exclude data below this … … 283 288 *****************************************************************************/ 284 289 void p_psVectorMin(const psVector* restrict myVector, 285 const psVector* restrict maskVector, psU32 maskVal, psStats* stats) 286 { 287 psS32 i = 0; // Loop index variable 290 const psVector* restrict maskVector, 291 psU32 maskVal, 292 psStats* stats) 293 { 294 psS32 i = 0; // Loop index variable 288 295 float min = PS_MAX_FLOAT; // The calculated maximum 289 296 float rangeMin = 0.0; // Exclude data below this … … 344 351 *****************************************************************************/ 345 352 psS32 p_psVectorNValues(const psVector* restrict myVector, 346 const psVector* restrict maskVector, psU32 maskVal, psStats* stats) 347 { 348 psS32 i = 0; // Loop index variable 349 psS32 numData = 0; // The number of data points 353 const psVector* restrict maskVector, 354 psU32 maskVal, 355 psStats* stats) 356 { 357 psS32 i = 0; // Loop index variable 358 psS32 numData = 0; // The number of data points 350 359 float rangeMin = 0.0; // Exclude data below this 351 360 float rangeMax = 0.0; // Exclude date above this
Note:
See TracChangeset
for help on using the changeset viewer.
