17 #ifndef _IGNITION_KMEANS_HH_ 
   18 #define _IGNITION_KMEANS_HH_ 
   37       public: 
Kmeans(
const std::vector<Vector3d> &_obs);
 
   40       public: 
virtual ~
Kmeans() = 
default;
 
   44       public: std::vector<Vector3d> Observations() 
const;
 
   49       public: 
bool Observations(
const std::vector<Vector3d> &_obs);
 
   54       public: 
bool AppendObservations(
const std::vector<Vector3d> &_obs);
 
   67       public: 
bool Cluster(
int _k,
 
   68                            std::vector<Vector3d> &_centroids,
 
   69                            std::vector<unsigned int> &_labels);
 
   74       private: 
unsigned int ClosestCentroid(
const Vector3d &_p) 
const;
 
   77       private: std::vector<Vector3d> obs;
 
   80       private: std::vector<Vector3d> centroids;
 
   83       private: std::vector<unsigned int> labels;
 
   86       private: std::vector<Vector3d> sums;
 
   89       private: std::vector<unsigned int> counters;
 
#define IGNITION_VISIBLE
Use to represent "symbol visible" if supported. 
Definition: Helpers.hh:346
K-Means clustering algorithm. 
Definition: Kmeans.hh:33