00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkStatisticsAlgorithm_h
00018 #define __itkStatisticsAlgorithm_h
00019
00020 #include "itkSample.h"
00021 #include "itkSubsample.h"
00022
00023 namespace itk {
00024 namespace Statistics {
00025 namespace Algorithm {
00026
00027 #if !defined(_MSC_VER)
00028
00029 template< class TSize >
00030 TSize FloorLog(TSize size);
00031
00032 template< class TValue >
00033 TValue MedianOfThree(const TValue a, const TValue b, const TValue c);
00034
00035 template< class TSample >
00036 void FindSampleBound(const TSample* sample,
00037 typename TSample::ConstIterator begin,
00038 typename TSample::ConstIterator end,
00039 typename TSample::MeasurementVectorType &min,
00040 typename TSample::MeasurementVectorType &max);
00041
00042 template< class TSubsample >
00043 void FindSampleBoundAndMean(const TSubsample* sample,
00044 int beginIndex,
00045 int endIndex,
00046 typename TSubsample::MeasurementVectorType &min,
00047 typename TSubsample::MeasurementVectorType &max,
00048 typename TSubsample::MeasurementVectorType &mean);
00049
00062 template< class TSubsample >
00063 int Partition(TSubsample* sample,
00064 unsigned int activeDimension,
00065 int beginIndex, int endIndex,
00066 const typename TSubsample::MeasurementType partitionValue);
00067
00076 template< class TSubsample >
00077 typename TSubsample::MeasurementType
00078 QuickSelect(TSubsample* sample,
00079 unsigned int activeDimension,
00080 int beginIndex, int endIndex,
00081 int kth,
00082 typename TSubsample::MeasurementType medianGuess);
00083
00090 template< class TSubsample >
00091 typename TSubsample::MeasurementType
00092 QuickSelect(TSubsample* sample,
00093 unsigned int activeDimension,
00094 int beginIndex, int endIndex,
00095 int kth);
00096
00103 template< class TSubsample >
00104 typename TSubsample::MeasurementType
00105 NthElement(TSubsample* sample,
00106 unsigned int activeDimension,
00107 int beginIndex, int endIndex,
00108 int nth);
00109
00110 template< class TSubsample >
00111 void InsertSort(TSubsample* sample,
00112 unsigned int activeDimension,
00113 int beginIndex, int endIndex);
00114
00115 template< class TSubsample >
00116 void DownHeap(TSubsample* sample,
00117 unsigned int activeDimension,
00118 int beginIndex, int endIndex, int node);
00119
00120 template< class TSubsample >
00121 void HeapSort(TSubsample* sample,
00122 unsigned int activeDimension,
00123 int beginIndex, int endIndex);
00124
00125
00126 template< class TSubsample >
00127 void IntrospectiveSortLoop(TSubsample* sample,
00128 unsigned int activeDimension,
00129 int beginIndex,
00130 int endIndex,
00131 int depthLimit,
00132 int sizeThreshold);
00133
00134 template< class TSubsample >
00135 void IntrospectiveSort(TSubsample* sample,
00136 unsigned int activeDimension,
00137 int beginIndex, int endIndex,
00138 int sizeThreshold);
00139
00140 #endif // #if defined(_MSC_VER)
00141 }
00142 }
00143 }
00144
00145 #ifndef ITK_MANUAL_INSTANTIATION
00146 #include "itkStatisticsAlgorithm.txx"
00147 #endif
00148
00149 #endif // #ifndef __itkStatisticsAlgorithm_h
00150