[ 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 &)

## Detailed Description

### template<class T>
class vigra::merge_graph_detail::IterablePartition< T >

Disjoint set data structure with path compression.

## Constructor & Destructor Documentation

## ◆ IterablePartition()

IterablePartition | ( | const value_type & | size | ) |

Construct a partition.

Parameters

  size | Number of distinct sets.

## Member Function Documentation

## ◆ find() [1/2]

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.

Parameters

  element | Element.

## ◆ find() [2/2]

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.

Parameters

  element | Element.

## ◆ reset()

void reset | ( | const value_type & | size | ) |

Reset a partition such that each set contains precisely one element

Parameters

  size | Number of distinct sets.

## ◆ merge()

void merge | ( | value_type | element1,
|  | value_type | element2
| ) |  |

Merge two sets.

Parameters

  element1 | Element in the first set.
  element2 | Element in the second set.

The documentation for this class was generated from the following file:

- vigra/merge_graph_adaptor.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.1