gz/math/Kmeans.hh
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
STL class.
std::vector< Vector3d > Observations() const
Get the observations to cluster.
bool Cluster(int _k, std::vector< Vector3d > &_centroids, std::vector< unsigned int > &_labels)
Executes the k-means algorithm.
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to ke...
Definition: gz/math/Vector3.hh:41
K-Means clustering algorithm. Given a set of observations, k-means partitions the observations into k...
Definition: gz/math/Kmeans.hh:40
bool AppendObservations(const std::vector< Vector3d > &_obs)
Add observations to the cluster.