2#ifndef STORMM_CLUSTER_MANAGER_H
3#define STORMM_CLUSTER_MANAGER_H
7#include "Accelerator/hybrid.h"
8#include "Constants/hpc_bounds.h"
9#include "Synthesis/condensate.h"
10#include "Synthesis/phasespace_synthesis.h"
11#include "Trajectory/coordinateframe.h"
12#include "Trajectory/coordinate_series.h"
13#include "Trajectory/phasespace.h"
20using card::HybridKind;
21using card::HybridTargetLevel;
22using synthesis::Condensate;
23using synthesis::PhaseSpaceSynthesis;
24using trajectory::CoordinateFrame;
25using trajectory::PhaseSpace;
26using trajectory::CoordinateSeries;
32template <
typename Tcalc>
38 size_t* cls_membership_in,
size_t* cls_bounds_in,
size_t* cls_primes_in,
39 Tcalc* cls_rmsd_in, Tcalc* centroid_dist_in);
61template <
typename Tdata,
typename Tcalc>
67 explicit ClusterManager(
size_t data_point_count_in = 0,
int cluster_count_in = 1,
68 int attempt_count_in = 0);
138 void resize(
size_t data_point_count_in,
int cluster_count_in);
152 size_t data_point_count;
173 std::vector<Tdata> centroids;
195 void validateClusterIndex(
int cluster_index)
const;
201#include "cluster_manager.tpp"
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
const ClusterManagerKit< Tcalc > data(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the abstract.
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.
ClusterManager(const ClusterManager &original)
The copy and move constructors, as well as copy and move assignment operators, must be explicitly ins...
int getClusterHome(size_t point_index) const
Get the cluster to which a specific data point belongs.
int getAttemptCount() const
Get the number of attempts made to cluster the data resulting in the reported arrangement.
int getClusterCount() const
Get the number of clusters.
const Tdata & getClusterCentroid(int cluster_index) const
Get the centroid for a particular cluster.
size_t getClusterSize(int cluster_index) const
Get the size of a cluster.
void setCentroid(int cluster_index, const Tdata value)
Set the value of one cluster's centroid.
size_t getClusterPrime(int cluster_index) const
Get the cluster member nearest the cluster centroid.
void setAttemptCount(int attempt_count_in)
Set the number of attempts.
size_t getDataPointCount() const
Get the number of data points.
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 se...
std::vector< size_t > getClusterMembers(int cluster_index) const
Get all members of a cluster.
An abstract of the cluster manager suitable for rapid access and modification in the C++ layer,...
Definition cluster_manager.h:33
size_t * cls_membership
Concatenated lists of the data points each cluster comprises.
Definition cluster_manager.h:52
ClusterManagerKit(size_t data_points_in, int clusters_in, int *cls_homes_in, size_t *cls_membership_in, size_t *cls_bounds_in, size_t *cls_primes_in, Tcalc *cls_rmsd_in, Tcalc *centroid_dist_in)
The constructor takes arguments for every member variable.
int * cls_homes
Definition cluster_manager.h:50
const int clusters
The number of clusters into which data points are grouped.
Definition cluster_manager.h:49
const size_t data_points
The number of data points in the entire set.
Definition cluster_manager.h:48
size_t * cls_bounds
Bounds array on cls_membership.
Definition cluster_manager.h:53
size_t * cls_primes
Members of each cluster nearest the cluster's centroid.
Definition cluster_manager.h:54
Tcalc * centroid_dist
Distance of each data point to its cluster's centroid.
Definition cluster_manager.h:57
ClusterManagerKit(const ClusterManagerKit &original)=default
The const sizing elements mean that the default copy and move assignment operators will be implicitly...
Tcalc * cls_rmsd
Definition cluster_manager.h:55