ITK  6.0.0
Insight Toolkit
Functions
itk::Statistics::Algorithm Namespace Reference

Functions

template<typename TSubsample >
void DownHeap (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int node)
 
template<typename TSample >
void FindSampleBound (const TSample *sample, const typename TSample::ConstIterator &begin, const typename TSample::ConstIterator &end, typename TSample::MeasurementVectorType &min, typename TSample::MeasurementVectorType &max)
 
template<typename TSubsample >
void FindSampleBoundAndMean (const TSubsample *sample, int beginIndex, int endIndex, typename TSubsample::MeasurementVectorType &min, typename TSubsample::MeasurementVectorType &max, typename TSubsample::MeasurementVectorType &mean)
 
template<typename TSize >
TSize FloorLog (TSize size)
 
template<typename TSubsample >
void HeapSort (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)
 
template<typename TSubsample >
void InsertSort (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)
 
template<typename TSubsample >
void IntrospectiveSort (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int sizeThreshold)
 
template<typename TSubsample >
void IntrospectiveSortLoop (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int depthLimit, int sizeThreshold)
 
template<typename TValue >
TValue MedianOfThree (const TValue a, const TValue b, const TValue c)
 
template<typename TSubsample >
TSubsample::MeasurementType NthElement (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int nth)
 
template<typename TSubsample >
int Partition (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, const typename TSubsample::MeasurementType partitionValue)
 
template<typename TSubsample >
TSubsample::MeasurementType QuickSelect (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int kth)
 
template<typename TSubsample >
TSubsample::MeasurementType QuickSelect (TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int kth, typename TSubsample::MeasurementType medianGuess)
 

Function Documentation

◆ DownHeap()

template<typename TSubsample >
void itk::Statistics::Algorithm::DownHeap ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex,
int  node 
)

◆ FindSampleBound()

template<typename TSample >
void itk::Statistics::Algorithm::FindSampleBound ( const TSample *  sample,
const typename TSample::ConstIterator &  begin,
const typename TSample::ConstIterator &  end,
typename TSample::MeasurementVectorType &  min,
typename TSample::MeasurementVectorType &  max 
)

Finds the minimum and maximum of each measurement value, over an interval within a sample.

Samples are considered independently of each other.

Parameters
[in]sampleAn instance of TSample.
[in]beginAn iterator to the first measurement vector in sample to be considered.
[in]endAn iterator to the last measurement vector in sample to be considered.
[out]minA new measurement vector, with the minimum values.
[out]maxA new measurement vector, with the maximum values.
Template Parameters
TSampleA subtype of Statistics::Sample.

◆ FindSampleBoundAndMean()

template<typename TSubsample >
void itk::Statistics::Algorithm::FindSampleBoundAndMean ( const TSubsample *  sample,
int  beginIndex,
int  endIndex,
typename TSubsample::MeasurementVectorType &  min,
typename TSubsample::MeasurementVectorType &  max,
typename TSubsample::MeasurementVectorType &  mean 
)

The endIndex should points one point after the last elements.

◆ FloorLog()

template<typename TSize >
TSize itk::Statistics::Algorithm::FloorLog ( TSize  size)

◆ HeapSort()

template<typename TSubsample >
void itk::Statistics::Algorithm::HeapSort ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex 
)

◆ InsertSort()

template<typename TSubsample >
void itk::Statistics::Algorithm::InsertSort ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex 
)

◆ IntrospectiveSort()

template<typename TSubsample >
void itk::Statistics::Algorithm::IntrospectiveSort ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex,
int  sizeThreshold 
)

◆ IntrospectiveSortLoop()

template<typename TSubsample >
void itk::Statistics::Algorithm::IntrospectiveSortLoop ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex,
int  depthLimit,
int  sizeThreshold 
)

◆ MedianOfThree()

template<typename TValue >
TValue itk::Statistics::Algorithm::MedianOfThree ( const TValue  a,
const TValue  b,
const TValue  c 
)

◆ NthElement()

template<typename TSubsample >
TSubsample::MeasurementType itk::Statistics::Algorithm::NthElement ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex,
int  nth 
)

NthElement is an algorithm for finding the n-th largest element of a list.

In this case, only one of the components of the measurement vectors is considered. This component is defined by the argument activeDimension. The search is restricted to the range between the index begin and end, also passed as arguments. This algorithm was based on the procedure used in the STL nth_element method.

◆ Partition()

template<typename TSubsample >
int itk::Statistics::Algorithm::Partition ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex,
const typename TSubsample::MeasurementType  partitionValue 
)

The Partition algorithm performs partial sorting in a sample.

Given a partitionValue, the algorithm moves to the beginning of the sample all MeasurementVectors whose component activeDimension is smaller than the partitionValue. In this way, the sample is partially sorted in two groups. First the group with activeDimension component smaller than the partitionValue, then the group of MeasurementVectors with activeDimension component larger than the partitionValue. The Partition algorithm takes as input a sample, and a range in that sample defined by [beginIndex,endIndex]. Only the activeDimension components of the MeasurementVectors in the sample will be considered by the algorithm. The Algorithm return an index in the range of [beginIndex,endIndex] pointing to the element with activeDimension component closest to the partitionValue.

The endIndex should points one point after the last elements if multiple partitionValue exist in the sample the return index will points the middle of such values. Implemented following the description of the partition algorithm in the QuickSelect entry of the Wikipedia.

See also
https://en.wikipedia.org/wiki/Selection_algorithm.

◆ QuickSelect() [1/2]

template<typename TSubsample >
TSubsample::MeasurementType itk::Statistics::Algorithm::QuickSelect ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex,
int  kth 
)

QuickSelect is an algorithm for finding the k-th largest element of a list.

In this case, only one of the components of the measurement vectors is considered. This component is defined by the argument activeDimension. The search is restricted to the range between the index begin and end, also passed as arguments.

The endIndex should point one point after the last elements. Note that kth is an index in a different scale than [beginIndex,endIndex]. For example, it is possible to feed this function with beginIndex=15, endIndex=23, and kth=3, since we can ask for the element 3rd in the range [15,23].

See also
https://en.wikipedia.org/wiki/Selection_algorithm.

◆ QuickSelect() [2/2]

template<typename TSubsample >
TSubsample::MeasurementType itk::Statistics::Algorithm::QuickSelect ( TSubsample *  sample,
unsigned int  activeDimension,
int  beginIndex,
int  endIndex,
int  kth,
typename TSubsample::MeasurementType  medianGuess 
)

QuickSelect is an algorithm for finding the k-th largest element of a list.

In this case, only one of the components of the measurement vectors is considered. This component is defined by the argument activeDimension. The search is restricted to the range between the index begin and end, also passed as arguments.

The endIndex should point one point after the last elements. Note that kth is an index in a different scale than [beginIndex,endIndex]. For example, it is possible to feed this function with beginIndex=15, endIndex=23, and kth=3, since we can ask for the element 3rd in the range [15,23]. In this version, a guess value for the median index is provided in the argument medianGuess. The algorithm returns the value of the activeDimension component in the MeasurementVector located in the kth position.

See also
https://en.wikipedia.org/wiki/Selection_algorithm