#include <center_chooser.h>
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 ¢ers_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_ |
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.
typedef Distance::ResultType rtflann::GroupWiseCenterChooser< Distance >::DistanceType |
Definition at line 311 of file center_chooser.h.
typedef Distance::ElementType rtflann::GroupWiseCenterChooser< Distance >::ElementType |
Definition at line 310 of file center_chooser.h.
|
inline |
Definition at line 317 of file center_chooser.h.
|
inlinevirtual |
Chooses cluster centers
k | number of centers to choose |
indices | indices of points to choose the centers from |
indices_length | length of indices |
centers | indices of chosen centers |
centers_length | length of centers array |
Implements rtflann::CenterChooser< Distance >.
Definition at line 320 of file center_chooser.h.