|
Docs
|
Abstract interface for cluster information management. More...
#include <ClusterInfo.hpp>
Public Member Functions | |
| ClusterInfo ()=default | |
| virtual void | set_allocation (int index, int cluster, int old_cluster)=0 |
| Assigns a point to a cluster. | |
| virtual void | recompute (const int K, const Eigen::VectorXi &allocations)=0 |
| Recomputes all cluster information from current allocations. | |
| virtual void | move_cluster_info (int from_cluster, int to_cluster)=0 |
| Moves cluster information from one cluster to another. | |
| virtual void | remove_info (int cluster)=0 |
| Removes information related to a specific cluster. | |
| virtual | ~ClusterInfo ()=default |
Abstract interface for cluster information management.
This class provides an abstract interface for managing cluster-related information, including caching mechanisms that integrate with the Data class. Derived classes implement specific caching strategies for efficient cluster computations.
|
default |
|
virtualdefault |
|
pure virtual |
Moves cluster information from one cluster to another.
| from_cluster | Index of the source cluster |
| to_cluster | Index of the target cluster |
Implemented in BinaryCache, ContinuosCache, and SpatialCache.
|
pure virtual |
Recomputes all cluster information from current allocations.
| K | Current number of clusters |
| allocations | Vector of current cluster assignments for all points |
Implemented in BinaryCache, ContinuosCache, and SpatialCache.
|
pure virtual |
Removes information related to a specific cluster.
| cluster | Index of the cluster to remove |
Implemented in BinaryCache, ContinuosCache, and SpatialCache.
|
pure virtual |
Assigns a point to a cluster.
| index | Index of the point to reassign |
| cluster | Target cluster index (K for new cluster, -1 for unallocated) |
| old_cluster | Previous cluster index of the point |
| std::out_of_range | if index or cluster is invalid |
Implemented in BinaryCache, ContinuosCache, and SpatialCache.