Public Types | Public Member Functions | List of all members
rtflann::GroupWiseCenterChooser< Distance > Class Template Reference

#include <center_chooser.h>

Inheritance diagram for rtflann::GroupWiseCenterChooser< Distance >:
Inheritance graph
[legend]

Public Types

typedef Distance::ResultType DistanceType
 
typedef Distance::ElementType ElementType
 
- Public Types inherited from rtflann::CenterChooser< Distance >
typedef Distance::ResultType DistanceType
 
typedef Distance::ElementType ElementType
 

Public Member Functions

 GroupWiseCenterChooser (const Distance &distance, const std::vector< ElementType * > &points)
 
void operator() (int k, int *indices, int indices_length, int *centers, int &centers_length)
 
- Public Member Functions inherited from rtflann::CenterChooser< Distance >
 CenterChooser (const Distance &distance, const std::vector< ElementType * > &points)
 
void setDataSize (size_t cols)
 
virtual ~CenterChooser ()
 

Additional Inherited Members

- Protected Attributes inherited from rtflann::CenterChooser< Distance >
size_t cols_
 
const Distance distance_
 
const std::vector< ElementType * > & points_
 

Detailed Description

template<typename Distance>
class rtflann::GroupWiseCenterChooser< Distance >

Chooses the initial centers in a way inspired by Gonzales (by Pierre-Emmanuel Viel): select the first point of the list as a candidate, then parse the points list. If another point is further than current candidate from the other centers, test if it is a good center of a local aggregation. If it is, replace current candidate by this point. And so on...

Used with KMeansIndex that computes centers coordinates by averaging positions of clusters points, this doesn't make a real difference with previous methods. But used with HierarchicalClusteringIndex class that pick centers among existing points instead of computing the barycenters, there is a real improvement.

Definition at line 307 of file center_chooser.h.

Member Typedef Documentation

template<typename Distance>
typedef Distance::ResultType rtflann::GroupWiseCenterChooser< Distance >::DistanceType

Definition at line 311 of file center_chooser.h.

template<typename Distance>
typedef Distance::ElementType rtflann::GroupWiseCenterChooser< Distance >::ElementType

Definition at line 310 of file center_chooser.h.

Constructor & Destructor Documentation

template<typename Distance>
rtflann::GroupWiseCenterChooser< Distance >::GroupWiseCenterChooser ( const Distance &  distance,
const std::vector< ElementType * > &  points 
)
inline

Definition at line 317 of file center_chooser.h.

Member Function Documentation

template<typename Distance>
void rtflann::GroupWiseCenterChooser< Distance >::operator() ( int  k,
int *  indices,
int  indices_length,
int *  centers,
int &  centers_length 
)
inlinevirtual

Chooses cluster centers

Parameters
knumber of centers to choose
indicesindices of points to choose the centers from
indices_lengthlength of indices
centersindices of chosen centers
centers_lengthlength of centers array

Implements rtflann::CenterChooser< Distance >.

Definition at line 320 of file center_chooser.h.


The documentation for this class was generated from the following file:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:09