|
| | Datax (const utils_params &p, std::vector< std::shared_ptr< ClusterInfo > > ci, const Eigen::VectorXi &initial_allocations=Eigen::VectorXi()) |
| void | set_allocation (int index, int cluster) override |
| | Assigns a point to a cluster.
|
| void | set_allocations (const Eigen::VectorXi &new_allocations) override |
| | Sets all cluster allocations at once.
|
| 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.
|
| virtual | ~Datax ()=default |
| | Data (const utils_params &p, const Eigen::VectorXi &initial_allocations=Eigen::VectorXi()) |
| | Constructs a Data object with a distance matrix.
|
| virtual | ~Data ()=default |
| double | get_data (int i, int j=0) const |
| | Getters.
|
| int | get_n () const |
| | Gets the total number of points.
|
| int | get_K () const |
| | Gets the current number of clusters.
|
| int | get_p () const |
| | Gets the number of columns in the data.
|
| const Eigen::VectorXi & | get_allocations () const |
| | Gets the cluster allocations vector.
|
| int | get_cluster_size (unsigned cluster_index) const |
| | Gets the size of a specific cluster.
|
| int | get_cluster_assignment (int index) const |
| | Gets the cluster assignment of a specific point.
|
| Eigen::VectorXi | get_cluster_assignments (int cluster) const |
| | Gets all point indices assigned to a specific cluster.
|
| Eigen::Map< const Eigen::VectorXi > | get_cluster_assignments_ref (int cluster) const |
| | Gets all point indices assigned to a specific cluster (map form).
|
| std::unordered_map< int, std::vector< int > > | get_cluster_map_copy () const |
| | Gets the full mapping of clusters to their member points.
|
| const std::unordered_map< int, std::vector< int > > & | get_cluster_map () const |
| | Gets the full mapping of clusters to their member points.
|
Data container with integrated cluster information management.
This class extends the base Data class to include a vector of ClusterInfo objects that can provide additional cluster-related computations or caching. It maintains synchronization between data allocations and cluster information.