17 #ifndef _GAZEBO_KMEANS_HH_
18 #define _GAZEBO_KMEANS_HH_
48 public: std::vector<Vector3> Observations()
const;
53 public:
bool Observations(
const std::vector<Vector3> &_obs);
58 public:
bool AppendObservations(
const std::vector<Vector3> &_obs);
71 public:
bool Cluster(
int _k,
72 std::vector<Vector3> &_centroids,
73 std::vector<unsigned int> &_labels);
78 private:
unsigned int ClosestCentroid(
const Vector3 &_p)
const;
81 private: std::vector<Vector3> obs;
84 private: std::vector<Vector3> centroids;
87 private: std::vector<unsigned int> labels;
90 private: std::vector<Vector3> sums;
93 private: std::vector<unsigned int> counters;
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
static const double GAZEBO_DEPRECATED(8.0) MAX_D
Double maximum value. This value will be similar to 1.79769e+308.
Definition: Helpers.hh:140
K-Means clustering algorithm.
Definition: Kmeans.hh:36