Cluster centroids¶
Provides functions for computing the centroids of clusters.
- Authors
Simone Balducci, Felice Pantaleo, Marco Rovere, Wahid Redjeb, Aurora Perego, Francesco Giacomini
-
namespace clue¶
Typedefs¶
Functions¶
-
template<std::size_t Ndim>
inline Centroid<Ndim> cluster_centroid(const clue::PointsHost<Ndim> &points, std::size_t cluster_id)¶ Compute the centroid of a specific cluster from the given Points.
- Template Parameters:¶
- std::size_t Ndim¶
The number of dimensions of the points
- Parameters:¶
- const clue::PointsHost<Ndim> &points¶
The PointsHost object containing the points
- std::size_t cluster_id¶
The ID of the cluster for which to compute the centroid
- Returns:¶
The centroid of the specified cluster as an array of floats
-
template<std::size_t Ndim>
inline Centroids<Ndim> cluster_centroids(const clue::PointsHost<Ndim> &points)¶ Compute the centroids of all clusters from the given Points.
- Template Parameters:¶
- std::size_t Ndim¶
The number of dimensions of the points
- Parameters:¶
- const clue::PointsHost<Ndim> &points¶
The PointsHost object containing the points
- Returns:¶
A vector of centroids, one for each cluster
-
template<std::size_t Ndim>