Go to the documentation of this file.
35 #ifndef LVR2_UTIL_CLUSTERBIMAP_H_
36 #define LVR2_UTIL_CLUSTERBIMAP_H_
53 template<
typename HandleT>
71 template<
typename HandleT>
162 #include "lvr2/util/ClusterBiMap.tcc"
const Cluster< HandleT > & getCluster(ClusterHandle clusterHandle) const
Get cluster behind the cluster handle.
Iterator over handles in this vector, which skips deleted elements.
ClusterBiMapIterator< HandleT > end() const
size_t numHandles() const
Returns the number of handles in all clusters in the set.
void removeCluster(ClusterHandle clusterHandle)
Removes the cluster behind the given handle.
DenseAttrMap< HandleT, ClusterHandle > m_clusterMap
Map from handle -> cluster to save the back-reference for stored handles.
void reserve(size_t newCap)
Represents a group of handles, which are somehow connected.
bool operator!=(const ClusterBiMapIterator &other) const
A map with constant lookup overhead using small-ish integer-keys.
Iterator over cluster handles in this cluster map.
Semantically equivalent to boost::optional<ClusterHandle>
A vector which guarantees stable indices and features O(1) deletion.
ClusterBiMapIterator< HandleT > begin() const
bool operator==(const ClusterBiMapIterator &other) const
ClusterHandle createCluster()
Creates a cluster and returns its handle.
size_t numCluster() const
Returns the number of cluster in this set.
ClusterHandle getClusterH(HandleT handle) const
Returns a handle to the cluster to which the given handle is referenced.
Handle to access Cluster of the ClusterBiMap.
ClusterBiMapIterator(StableVectorIterator< ClusterHandle, Cluster< HandleT >> iterator)
ClusterHandle operator*() const
size_t m_numHandles
Number of handels in all clusters.
StableVector< ClusterHandle, Cluster< HandleT > > m_cluster
Clusters.
ClusterHandle removeFromCluster(ClusterHandle clusterHandle, HandleT handle)
Removes the given handle from the cluster behind the given cluster handle.
const Cluster< HandleT > & operator[](ClusterHandle clusterHandle) const
Request the value behind the given key.
Cluster< HandleT > & getC(ClusterHandle clusterHandle)
Private helper to get cluster behind the cluster handle.
A map of clusters, which also saves a back-reference from handle to cluster.
ClusterBiMapIterator & operator++()
OptionalClusterHandle getClusterOf(HandleT handle) const
Returns the handle of the cluster to which the given handle belongs to.
ClusterHandle addToCluster(ClusterHandle clusterHandle, HandleT handle)
Adds the given handle to the cluster behind the given cluster handle.
StableVectorIterator< ClusterHandle, Cluster< HandleT > > m_iterator
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23