|
Blender V4.3
|
#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, and T.
|
inline |
Find the element that represents the set containing x currently.
Definition at line 73 of file BLI_disjoint_set.hh.
References x.
Referenced by blender::DisjointSet< T >::in_same_set(), blender::DisjointSet< T >::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 blender::DisjointSet< T >::find_root().
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 blender::DisjointSet< T >::find_root().
Referenced by blender::tests::TEST().