|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
40 namespace datastructure {
70 unsigned int find(
unsigned int u) {
87 void merge(
unsigned int u,
unsigned int v) {
88 unsigned int set_u =
find(u);
89 unsigned int set_v =
find(v);
96 }
else if (
data[set_v] >
data[set_u]) {
The namespace for all OGDF objects.
unsigned int find(unsigned int u)
Find the representative to element u.
void merge(unsigned int u, unsigned int v)
Merge the two sets containing u and v.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
UnionFind(unsigned int max_element)
Create a new set representation with not more than max_element elements.
Implements the Union Find Datastructure to maintain disjoint sets efficiently.
unsigned int operator[](unsigned int u)
void all_to_singletons()
Assigns every element to a singleton set.
Basic declarations, included by all source files.