36 Datax(
const Params &p, std::vector<std::shared_ptr<ClusterInfo>> ci,
37 const Eigen::VectorXi &initial_allocations = Eigen::VectorXi())
62 void restore_state(Eigen::VectorXi &old_allocations, std::unordered_map<
int, std::vector<int>> &old_cluster_members,
Abstract base class for managing cluster information and caches.
Data structure for managing point distances and cluster allocations.
Data(const Params &p, const Eigen::VectorXi &initial_allocations=Eigen::VectorXi())
Constructs a Data object with a distance matrix.
Definition Data.cpp:10
void restore_state(Eigen::VectorXi &old_allocations, std::unordered_map< int, std::vector< int > > &old_cluster_members, int old_K) override
Restores allocations, cluster memberships, and cluster count from a saved state.
Definition Datax.cpp:85
void set_allocation(int index, int cluster) override
Assigns a point to a cluster.
Definition Datax.cpp:58
void compact_cluster(int old_cluster)
Definition Datax.cpp:9
void set_allocations(const Eigen::VectorXi &new_allocations) override
Sets all cluster allocations at once.
Definition Datax.cpp:78
Datax(const Params &p, std::vector< std::shared_ptr< ClusterInfo > > ci, const Eigen::VectorXi &initial_allocations=Eigen::VectorXi())
Definition Datax.hpp:36
std::vector< std::shared_ptr< ClusterInfo > > cluster_info
Definition Datax.hpp:31
Structure containing all parameters needed for the NGGP (Normalized Generalized Gamma Process) and DP...
Definition Params.hpp:35