|
Blender
V2.93
|
#include <BLI_disjoint_set.hh>
Public Member Functions | |
| DisjointSet (int64_t size) | |
| void | join (int64_t x, int64_t y) |
| bool | in_same_set (int64_t x, int64_t y) |
| int64_t | find_root (int64_t x) |
Definition at line 29 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 38 of file BLI_disjoint_set.hh.
References BLI_assert, and size().
Find the element that represents the set containing x currently.
Definition at line 84 of file BLI_disjoint_set.hh.
References x.
Referenced by in_same_set(), join(), and blender::tests::TEST().
Return true when x and y are in the same set.
Definition at line 74 of file BLI_disjoint_set.hh.
References find_root().
Referenced by blender::fn::mf_network_optimization::nodes_output_same_values(), and blender::tests::TEST().
Join the sets containing elements x and y. Nothing happens when they have been in the same set before.
Definition at line 50 of file BLI_disjoint_set.hh.
References find_root(), and swap().
Referenced by blender::fn::mf_network_optimization::nodes_output_same_values(), and blender::tests::TEST().