[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
|   | IterablePartition< T > Class Template Reference |  | 
#include <vigra/merge_graph_adaptor.hxx>
| Public Member Functions | |
| value_type | find (const value_type &) const | 
| value_type | find (value_type) | 
| IterablePartition () | |
| Construct a partition. | |
| IterablePartition (const value_type &) | |
| void | merge (value_type, value_type) | 
| void | reset (const value_type &) | 
Disjoint set data structure with path compression.
| IterablePartition | ( | const value_type & | size | ) | 
Construct a partition.
| size | Number of distinct sets. | 
| IterablePartition< T >::value_type find | ( | const value_type & | element | ) | const | 
Find the representative element of the set that contains the given element.
This constant function does not compress the search path.
| element | Element. | 
| IterablePartition< T >::value_type find | ( | value_type | element | ) | 
Find the representative element of the set that contains the given element.
This mutable function compresses the search path.
| element | Element. | 
| void reset | ( | const value_type & | size | ) | 
Reset a partition such that each set contains precisely one element
| size | Number of distinct sets. | 
| void merge | ( | value_type | element1, | 
| value_type | element2 | ||
| ) | 
Merge two sets.
| element1 | Element in the first set. | 
| element2 | Element in the second set. | 
| 
© Ullrich Köthe     (ullrich.koethe@iwr.uni-heidelberg.de)  | 
html generated using doxygen and Python
 |