GreedyKCenters.h
An instance of this class can be used to greedily select a given number of representatives from a set...
Definition: GreedyKCenters.h:48
const DistanceFunction & getDistanceFunction() const
Get the distance function used.
Definition: GreedyKCenters.h:69
boost::function< double(const _T &, const _T &)> DistanceFunction
The definition of a distance function.
Definition: GreedyKCenters.h:52
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Definition: RandomNumbers.h:54
void setDistanceFunction(const DistanceFunction &distFun)
Set the distance function to use.
Definition: GreedyKCenters.h:63
void kcenters(const std::vector< _T > &data, unsigned int k, std::vector< unsigned int > ¢ers, std::vector< std::vector< double > > &dists)
Greedy algorithm for selecting k centers.
Definition: GreedyKCenters.h:82
int uniformInt(int lower_bound, int upper_bound)
Generate a random integer within given bounds: [lower_bound, upper_bound].
Definition: RandomNumbers.h:75