|
Blender V5.0
|
#include <BLI_disjoint_set.hh>
Public Member Functions | |
| DisjointSet (const int64_t size) | |
| void | join (const T x, const T y) |
| bool | in_same_set (const T x, const T y) |
| T | find_root (const T x) |
Definition at line 18 of file BLI_disjoint_set.hh.
|
inline |
Create a new disjoint set with the given size. Initially, every element is in a separate set.
Definition at line 27 of file BLI_disjoint_set.hh.
References BLI_assert, i, size(), and T.
|
inline |
Find the element that represents the set containing x currently.
Definition at line 73 of file BLI_disjoint_set.hh.
Referenced by in_same_set(), join(), and blender::tests::TEST().
|
inline |
Return true when x and y are in the same set.
Definition at line 63 of file BLI_disjoint_set.hh.
References find_root(), T, x, and y.
Referenced by blender::tests::TEST().
|
inline |
Join the sets containing elements x and y. Nothing happens when they have been in the same set before.
Definition at line 39 of file BLI_disjoint_set.hh.
References find_root(), T, x, and y.
Referenced by blender::tests::TEST().