|
OpenGM
2.3.x
Discrete Graphical Model Library
|
Disjoint set data structure with path compression. More...
#include <partition.hxx>
Collaboration diagram for opengm::Partition< T >:Public Types | |
| typedef T | value_type |
Public Member Functions | |
| Partition () | |
| Construct a partition. More... | |
| Partition (const value_type &) | |
| Construct a partition. More... | |
| value_type | find (const value_type &) const |
| Find the representative element of the set that contains the given element. More... | |
| value_type | find (value_type) |
| Find the representative element of the set that contains the given element. More... | |
| value_type | numberOfElements () const |
| value_type | numberOfSets () const |
| template<class Iterator > | |
| void | elementLabeling (Iterator) const |
| Output a continuous labeling of all elements. More... | |
| template<class Iterator > | |
| void | representatives (Iterator) const |
| Output all elements which are set representatives. More... | |
| void | representativeLabeling (std::map< value_type, value_type > &) const |
| Output a continuous labeling of the representative elements. More... | |
| void | reset (const value_type &) |
| Reset a partition such that each set contains precisely one element. More... | |
| void | merge (value_type, value_type) |
| Merge two sets. More... | |
| void | insert (const value_type &) |
| Insert new sets. More... | |
Disjoint set data structure with path compression.
Definition at line 13 of file partition.hxx.
| typedef T opengm::Partition< T >::value_type |
Definition at line 15 of file partition.hxx.
| opengm::Partition< T >::Partition | ( | ) |
Construct a partition.
Definition at line 43 of file partition.hxx.
|
inline |
Construct a partition.
| size | Number of distinct sets. |
Definition at line 57 of file partition.hxx.
|
inline |
Output a continuous labeling of all elements.
| out | (Output) Iterator into a container in which the j-th entry is the label of the element j. |
Definition at line 237 of file partition.hxx.
|
inline |
Find the representative element of the set that contains the given element.
This constant function does not compress the search path.
| element | Element. |
Definition at line 100 of file partition.hxx.
|
inline |
Find the representative element of the set that contains the given element.
This mutable function compresses the search path.
| element | Element. |
Definition at line 121 of file partition.hxx.
|
inline |
Insert new sets.
| number | Number of sets to insert. |
Definition at line 177 of file partition.hxx.
|
inline |
Merge two sets.
| element1 | Element in the first set. |
| element2 | Element in the second set. |
Definition at line 147 of file partition.hxx.
Here is the caller graph for this function:
|
inline |
Definition at line 251 of file partition.hxx.
|
inline |
|
inline |
Output a continuous labeling of the representative elements.
| out | (Output) A map that assigns each representative element to its label. |
Definition at line 217 of file partition.hxx.
|
inline |
Output all elements which are set representatives.
| it | (Output) Iterator into a container. |
Definition at line 198 of file partition.hxx.
Here is the caller graph for this function:
|
inline |
Reset a partition such that each set contains precisely one element.
| size | Number of distinct sets. |
Definition at line 77 of file partition.hxx.
1.8.9.1