Blender
V3.3
|
#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 15 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 24 of file BLI_disjoint_set.hh.
References BLI_assert, and size().
Find the element that represents the set containing x currently.
Definition at line 70 of file BLI_disjoint_set.hh.
References x.
Referenced by blender::nodes::node_geo_input_mesh_island_cc::IslandFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandCountFieldInput::get_varray_for_context(), in_same_set(), join(), blender::nodes::node_geo_scale_elements_cc::prepare_edge_islands(), blender::nodes::node_geo_scale_elements_cc::prepare_face_islands(), and blender::tests::TEST().
Return true when x and y are in the same set.
Definition at line 60 of file BLI_disjoint_set.hh.
References find_root().
Referenced by 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 36 of file BLI_disjoint_set.hh.
References find_root(), and swap().
Referenced by blender::nodes::node_geo_input_mesh_island_cc::IslandFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_scale_elements_cc::prepare_edge_islands(), blender::nodes::node_geo_scale_elements_cc::prepare_face_islands(), and blender::tests::TEST().