STORMM Source Documentation
|
An object to track the clusters into which a set of data points can be sorted. More...
#include <cluster_manager.h>
Public Member Functions | |
ClusterManager (size_t data_point_count_in=0, int cluster_count_in=1, int attempt_count_in=0) | |
The constructor accepts a number of data points and a number of clusters, as well as the number of seeding attempts, if available. | |
size_t | getDataPointCount () const |
Get the number of data points. | |
int | getClusterCount () const |
Get the number of clusters. | |
int | getAttemptCount () const |
Get the number of attempts made to cluster the data resulting in the reported arrangement. | |
int | getClusterHome (size_t point_index) const |
Get the cluster to which a specific data point belongs. | |
size_t | getClusterSize (int cluster_index) const |
Get the size of a cluster. | |
size_t | getClusterPrime (int cluster_index) const |
Get the cluster member nearest the cluster centroid. | |
std::vector< size_t > | getClusterMembers (int cluster_index) const |
Get all members of a cluster. | |
const Tdata & | getClusterCentroid (int cluster_index) const |
Get the centroid for a particular cluster. | |
const std::vector< Tdata > & | getClusterCentroids () const |
Get a const references to the vector of centroids for all clusters. | |
void | resize (size_t data_point_count_in, int cluster_count_in) |
Set the number of clusters and data points. | |
void | setAttemptCount (int attempt_count_in) |
Set the number of attempts. | |
void | setCentroid (int cluster_index, const Tdata value) |
Set the value of one cluster's centroid. | |
ClusterManager (const ClusterManager &original) | |
The copy and move constructors, as well as copy and move assignment operators, must be explicitly instantiated in order to repair POINTER-kind Hybrid objects among the member variables. | |
ClusterManager (ClusterManager &&original) | |
ClusterManager & | operator= (const ClusterManager &original) |
ClusterManager & | operator= (ClusterManager &&original) |
const ClusterManagerKit< Tcalc > | data (HybridTargetLevel tier=HybridTargetLevel::HOST) const |
Get the abstract. | |
ClusterManagerKit< Tcalc > | data (HybridTargetLevel tier=HybridTargetLevel::HOST) |
An object to track the clusters into which a set of data points can be sorted.
stormm::stmath::ClusterManager< Tdata, Tcalc >::ClusterManager | ( | const ClusterManager< Tdata, Tcalc > & | original | ) |
The copy and move constructors, as well as copy and move assignment operators, must be explicitly instantiated in order to repair POINTER-kind Hybrid objects among the member variables.
original | The object to copy or move |
other | A pre-existing object to place on the right-hand side of the assignment statement |
const ClusterManagerKit< Tcalc > stormm::stmath::ClusterManager< Tdata, Tcalc >::data | ( | HybridTargetLevel | tier = HybridTargetLevel::HOST | ) | const |
Get the abstract.
Overloaded:
tier | Set points to data on the GPU device or CPU host |
const Tdata & stormm::stmath::ClusterManager< Tdata, Tcalc >::getClusterCentroid | ( | int | cluster_index | ) | const |
Get the centroid for a particular cluster.
cluster_index | Index of the cluster of interest |
int stormm::stmath::ClusterManager< Tdata, Tcalc >::getClusterHome | ( | size_t | point_index | ) | const |
Get the cluster to which a specific data point belongs.
point_index | Index of the data point of interest |
std::vector< size_t > stormm::stmath::ClusterManager< Tdata, Tcalc >::getClusterMembers | ( | int | cluster_index | ) | const |
Get all members of a cluster.
cluster_index | Index of the cluster of interest |
size_t stormm::stmath::ClusterManager< Tdata, Tcalc >::getClusterPrime | ( | int | cluster_index | ) | const |
Get the cluster member nearest the cluster centroid.
cluster_index | Index of the cluster of interest |
size_t stormm::stmath::ClusterManager< Tdata, Tcalc >::getClusterSize | ( | int | cluster_index | ) | const |
Get the size of a cluster.
cluster_index | Index of the cluster of interest |
void stormm::stmath::ClusterManager< Tdata, Tcalc >::resize | ( | size_t | data_point_count_in, |
int | cluster_count_in ) |
Set the number of clusters and data points.
data_point_count_in | The new number of data points |
cluster_count_in | The new number of clusters to partition data points into |
void stormm::stmath::ClusterManager< Tdata, Tcalc >::setAttemptCount | ( | int | attempt_count_in | ) |
Set the number of attempts.
attempt_count_in | The number of attempted clusterings to log |
void stormm::stmath::ClusterManager< Tdata, Tcalc >::setCentroid | ( | int | cluster_index, |
const Tdata | value ) |
Set the value of one cluster's centroid.
cluster_index | Index of the cluster to set |
value | Value of the cluster's new centroid |