10 #ifndef math_modelsearch_h
11 #define math_modelsearch_h
58 template<
typename TModelFit>
59 bool ransacSingleModel(
const TModelFit& p_state,
61 const typename TModelFit::Real& p_fitnessThreshold,
62 typename TModelFit::Model& p_bestModel,
66 template<
typename TModelFit>
68 typename TModelFit::Model
model;
80 template<
typename TModelFit>
81 bool geneticSingleModel(
const TModelFit& p_state,
83 const typename TModelFit::Real& p_fitnessThreshold,
84 size_t p_populationSize,
85 size_t p_maxIteration,
86 typename TModelFit::Model& p_bestModel,
Model search implementations: RANSAC and genetic algorithm.
void pickRandomIndex(size_t p_size, size_t p_pick, vector_size_t &p_ind)
Select random (unique) indices from the 0..p_size sequence.
void pickRandomIndex(std::set< size_t > p_set, size_t p_pick, vector_size_t &p_ind)
Select random (unique) indices from the set.
std::vector< size_t > vector_size_t
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static bool compare(const TSpecies *p_a, const TSpecies *p_b)