17 #ifndef _GAZEBO_KMEANS_HH_
18 #define _GAZEBO_KMEANS_HH_
40 public:
Kmeans(
const std::vector<Vector3> &_obs);
47 public: std::vector<Vector3> Observations()
const;
52 public:
bool Observations(
const std::vector<Vector3> &_obs);
57 public:
bool AppendObservations(
const std::vector<Vector3> &_obs);
70 public:
bool Cluster(
int _k,
71 std::vector<Vector3> &_centroids,
72 std::vector<unsigned int> &_labels);
77 private:
unsigned int ClosestCentroid(
const Vector3 &_p)
const;
80 private: std::vector<Vector3> obs;
83 private: std::vector<Vector3> centroids;
86 private: std::vector<unsigned int> labels;
89 private: std::vector<Vector3> sums;
92 private: std::vector<unsigned int> counters;
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
K-Means clustering algorithm.
Definition: Kmeans.hh:36
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48