Changeset 1279
- Timestamp:
- Jul 22, 2004, 1:44:25 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r1277 r1279 18 18 #include "psMinimize.h" 19 19 #include "psFunctions.h" 20 ======= 21 22 /*****************************************************************************/ 23 /* DEFINE STATEMENTS */ 24 /*****************************************************************************/ 25 #define DEFAULT_ROBUST_SIZE_THRESHOLD 30000 // Vectors that are large than this 26 // will use robust statistical methods. 27 #define GAUSS_WIDTH 20 // The width of the Gaussian or boxcar smoothing. 28 #define CLIPPED_NUM_ITER_LB 1 29 #define CLIPPED_NUM_ITER_UB 10 30 #define CLIPPED_SIGMA_LB 1.0 31 #define CLIPPED_SIGMA_UB 10.0 32 #define true 1 33 #define false 0 34 #define MYMAXFLOAT HUGE 35 #define MAX_ITERATIONS 20 36 37 #ifndef DOXYGEN 38 void p_psVectorRobustStats(const psVector *restrict myVector, 39 const psVector *restrict maskVector, 40 unsigned int maskVal, 41 psStats *stats); 42 #endif 20 21 /*****************************************************************************/ 22 /* DEFINE STATEMENTS */ 23 /*****************************************************************************/ 24 #define DEFAULT_ROBUST_SIZE_THRESHOLD 30000 // Vectors that are large than this 25 // will use robust statistical methods. 26 #define GAUSS_WIDTH 20 // The width of the Gaussian or boxcar smoothing. 27 #define CLIPPED_NUM_ITER_LB 1 28 #define CLIPPED_NUM_ITER_UB 10 29 #define CLIPPED_SIGMA_LB 1.0 30 #define CLIPPED_SIGMA_UB 10.0 31 #define true 1 32 #define false 0 33 #define MYMAXFLOAT HUGE 34 #define MAX_ITERATIONS 20 35 36 void p_psVectorRobustStats(const psVector *restrict myVector, 37 const psVector *restrict maskVector, 38 unsigned int maskVal, 39 psStats *stats); 43 40 44 41 /** Preprocessor macro to generate error on an incorrect type */ … … 478 475 } 479 476 // Sort the temporary vectors. 480 ps VectorSort(sortedVector, unsortedVector);477 psSort(sortedVector, unsortedVector); 481 478 482 479 // Calculate the median exactly. … … 647 644 648 645 // Sort the temporary vectors. 649 ps VectorSort(sortedVector, unsortedVector);646 psSort(sortedVector, unsortedVector); 650 647 651 648 // Calculate the quartile points exactly. … … 1827 1824 (stats->options & PS_STAT_ROBUST_QUARTILE)) { 1828 1825 p_psVectorRobustStats(in, mask, maskVal, stats); 1829 1830 printf("HMMMM stats->robustMode is %f\n", stats->robustMode);1831 1826 } 1832 1827
Note:
See TracChangeset
for help on using the changeset viewer.
