ompl::GreedyKCenters< _T > Class Template Reference

An instance of this class can be used to greedily select a given number of representatives from a set of data points that are all far apart from each other. More...

#include <GreedyKCenters.h>

List of all members.

Public Types

typedef boost::function2
< double, const _T &, const _T & > 
DistanceFunction
 The definition of a distance function.

Public Member Functions

const DistanceFunctiongetDistanceFunction (void) const
 Get the distance function used.
 GreedyKCenters (void)
void kcenters (const std::vector< _T > &data, unsigned int k, std::vector< unsigned int > &centers, std::vector< std::vector< double > > &dists)
 Greedy algorithm for selecting k centers.
void setDistanceFunction (const DistanceFunction &distFun)
 Set the distance function to use.
virtual ~GreedyKCenters (void)

Protected Attributes

DistanceFunction distFun_
 The used distance function.
RNG rng_

Detailed Description

template<typename _T>
class ompl::GreedyKCenters< _T >

An instance of this class can be used to greedily select a given number of representatives from a set of data points that are all far apart from each other.

Definition at line 48 of file GreedyKCenters.h.


Member Typedef Documentation

template<typename _T >
typedef boost::function2<double, const _T&, const _T&> ompl::GreedyKCenters< _T >::DistanceFunction

The definition of a distance function.

Definition at line 52 of file GreedyKCenters.h.


Constructor & Destructor Documentation

template<typename _T >
ompl::GreedyKCenters< _T >::GreedyKCenters ( void   )  [inline]

Definition at line 54 of file GreedyKCenters.h.

template<typename _T >
virtual ompl::GreedyKCenters< _T >::~GreedyKCenters ( void   )  [inline, virtual]

Definition at line 58 of file GreedyKCenters.h.


Member Function Documentation

template<typename _T >
const DistanceFunction& ompl::GreedyKCenters< _T >::getDistanceFunction ( void   )  const [inline]

Get the distance function used.

Definition at line 69 of file GreedyKCenters.h.

template<typename _T >
void ompl::GreedyKCenters< _T >::kcenters ( const std::vector< _T > &  data,
unsigned int  k,
std::vector< unsigned int > &  centers,
std::vector< std::vector< double > > &  dists 
) [inline]

Greedy algorithm for selecting k centers.

Parameters:
data a vector of data points
k the desired number of centers
centers a vector of length k containing the indices into data of the k centers
dists a 2-dimensional array such that dists[i][j] is the distance between data[i] and data[center[j]]

Definition at line 82 of file GreedyKCenters.h.

template<typename _T >
void ompl::GreedyKCenters< _T >::setDistanceFunction ( const DistanceFunction distFun  )  [inline]

Set the distance function to use.

Definition at line 63 of file GreedyKCenters.h.


Member Data Documentation

template<typename _T >
DistanceFunction ompl::GreedyKCenters< _T >::distFun_ [protected]

The used distance function.

Definition at line 123 of file GreedyKCenters.h.

template<typename _T >
RNG ompl::GreedyKCenters< _T >::rng_ [protected]

Random number generator used to select first center

Definition at line 126 of file GreedyKCenters.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


ompl
Author(s): Ioan Sucan/isucan@rice.edu, Mark Moll/mmoll@rice.edu, Lydia Kavraki/kavraki@rice.edu
autogenerated on Fri Jan 11 11:37:45 2013