18#ifndef itkStatisticsAlgorithm_h
19#define itkStatisticsAlgorithm_h
25template <
typename TSize>
29template <
typename TValue>
48template <
typename TSample>
51 const typename TSample::ConstIterator & begin,
52 const typename TSample::ConstIterator & end,
53 typename TSample::MeasurementVectorType & min,
54 typename TSample::MeasurementVectorType & max);
57template <
typename TSubsample>
62 typename TSubsample::MeasurementVectorType & min,
63 typename TSubsample::MeasurementVectorType & max,
64 typename TSubsample::MeasurementVectorType & mean);
87template <
typename TSubsample>
90 unsigned int activeDimension,
93 const typename TSubsample::MeasurementType partitionValue);
112template <
typename TSubsample>
113typename TSubsample::MeasurementType
115 unsigned int activeDimension,
119 typename TSubsample::MeasurementType medianGuess);
135template <
typename TSubsample>
136typename TSubsample::MeasurementType
137QuickSelect(TSubsample * sample,
unsigned int activeDimension,
int beginIndex,
int endIndex,
int kth);
147template <
typename TSubsample>
148typename TSubsample::MeasurementType
149NthElement(TSubsample * sample,
unsigned int activeDimension,
int beginIndex,
int endIndex,
int nth);
151template <
typename TSubsample>
153InsertSort(TSubsample * sample,
unsigned int activeDimension,
int beginIndex,
int endIndex);
155template <
typename TSubsample>
157DownHeap(TSubsample * sample,
unsigned int activeDimension,
int beginIndex,
int endIndex,
int node);
159template <
typename TSubsample>
161HeapSort(TSubsample * sample,
unsigned int activeDimension,
int beginIndex,
int endIndex);
163template <
typename TSubsample>
166 unsigned int activeDimension,
172template <
typename TSubsample>
174IntrospectiveSort(TSubsample * sample,
unsigned int activeDimension,
int beginIndex,
int endIndex,
int sizeThreshold);
179#ifndef ITK_MANUAL_INSTANTIATION
180# include "itkStatisticsAlgorithm.hxx"
void IntrospectiveSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int sizeThreshold)
void FindSampleBoundAndMean(const TSubsample *sample, int beginIndex, int endIndex, typename TSubsample::MeasurementVectorType &min, typename TSubsample::MeasurementVectorType &max, typename TSubsample::MeasurementVectorType &mean)
void InsertSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)
void IntrospectiveSortLoop(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int depthLimit, int sizeThreshold)
TSize FloorLog(TSize size)
int Partition(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, const typename TSubsample::MeasurementType partitionValue)
TSubsample::MeasurementType NthElement(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int nth)
void FindSampleBound(const TSample *sample, const typename TSample::ConstIterator &begin, const typename TSample::ConstIterator &end, typename TSample::MeasurementVectorType &min, typename TSample::MeasurementVectorType &max)
TSubsample::MeasurementType QuickSelect(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int kth, typename TSubsample::MeasurementType medianGuess)
void DownHeap(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int node)
TValue MedianOfThree(const TValue a, const TValue b, const TValue c)
void HeapSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)