#include <nChooseKSampleSelector.h>
Public Types | |
| typedef Sample | SampleType |
| This typedef simply mirrors template argument Sample. | |
| typedef std::pair< typename std::vector< SampleType > ::const_iterator, typename std::vector< SampleType > ::const_iterator > | SampleSequenceType |
| This typedef specifies what type will be used to represent sequences of samples. | |
Public Member Functions | |
| template<class IterType > | |
| NChooseKSampleSelector (size_t sampleSize, IterType beginIter, IterType endIter) | |
| The constructor specifies the full population of samples from which to exhaustively select. | |
| size_t | getNumberOfSamples () |
| This member function returns the number of distinct combinations of sampleSize elements that can be drawn from the sequence passed to the constructor. | |
| SampleSequenceType | getPool () |
| This member function returns a SampleSequenceType instance containing the entire population passed to the constructor. | |
| size_t | getPoolSize () |
| This member function returns a the number of samples in the entire population passed to the constructor. | |
| SampleSequenceType | getSample (size_t sampleNumber) |
| This member function returns a SampleSequenceType instance drawn from the sample population. | |
It is useful for implementing robust statistics algorithms such as RANSAC.
Template argument Sample specifies what type of thing will make up the population from which samples will be drawn.
Definition at line 34 of file nChooseKSampleSelector.h.
| typedef std::pair<typename std::vector<SampleType>::const_iterator, typename std::vector<SampleType>::const_iterator> dlr::computerVision::NChooseKSampleSelector< Sample >::SampleSequenceType |
This typedef specifies what type will be used to represent sequences of samples.
See getSample(size_t) for more information.
Definition at line 51 of file nChooseKSampleSelector.h.
| typedef Sample dlr::computerVision::NChooseKSampleSelector< Sample >::SampleType |
This typedef simply mirrors template argument Sample.
Definition at line 42 of file nChooseKSampleSelector.h.
| dlr::computerVision::NChooseKSampleSelector< Sample >::NChooseKSampleSelector | ( | size_t | sampleSize, | |
| IterType | beginIter, | |||
| IterType | endIter | |||
| ) | [inline] |
The constructor specifies the full population of samples from which to exhaustively select.
| sampleSize | This argument specifies the size of the samples that will be drawn from the input sequence. The number of elements in the sequence [beginIter, endIter] must be at least this large. | |
| beginIter | This argument and the next specify a sequence from which to copy the sample population. | |
| endIter | This argument and the previous specify a sequence from which to copy the sample population. |
Definition at line 167 of file nChooseKSampleSelector.h.
| size_t dlr::computerVision::NChooseKSampleSelector< Sample >::getNumberOfSamples | ( | ) | [inline] |
This member function returns the number of distinct combinations of sampleSize elements that can be drawn from the sequence passed to the constructor.
Definition at line 193 of file nChooseKSampleSelector.h.
| SampleSequenceType dlr::computerVision::NChooseKSampleSelector< Sample >::getPool | ( | ) | [inline] |
This member function returns a SampleSequenceType instance containing the entire population passed to the constructor.
Definition at line 98 of file nChooseKSampleSelector.h.
| size_t dlr::computerVision::NChooseKSampleSelector< Sample >::getPoolSize | ( | ) | [inline] |
This member function returns a the number of samples in the entire population passed to the constructor.
Definition at line 111 of file nChooseKSampleSelector.h.
| NChooseKSampleSelector< Sample >::SampleSequenceType dlr::computerVision::NChooseKSampleSelector< Sample >::getSample | ( | size_t | sampleNumber | ) | [inline] |
This member function returns a SampleSequenceType instance drawn from the sample population.
This sequence will remain valid at least until the next call to getSample().
| sampleNumber | This argument specifies which of the available samples should be returned. Its value should be in the range 0 <= sampleNumber < this->getNumberOfSamples(). This function is more efficient if the value of sampleNumber starts at 0 and is incremented with each cal to getSample(). |
Definition at line 210 of file nChooseKSampleSelector.h.
1.5.8