17 #ifndef IGNITION_MATH_KMEANS_HH_
18 #define IGNITION_MATH_KMEANS_HH_
23 #include <ignition/math/config.hh>
29 inline namespace IGNITION_MATH_VERSION_NAMESPACE
43 public:
explicit Kmeans(
const std::vector<Vector3d> &_obs);
50 public: std::vector<Vector3d> Observations()
const;
55 public:
bool Observations(
const std::vector<Vector3d> &_obs);
60 public:
bool AppendObservations(
const std::vector<Vector3d> &_obs);
73 public:
bool Cluster(
int _k,
74 std::vector<Vector3d> &_centroids,
75 std::vector<unsigned int> &_labels);
80 private:
unsigned int ClosestCentroid(
const Vector3d &_p)
const;
83 private: KmeansPrivate *dataPtr;