Navigation
API > API/Runtime > API/Runtime/GeometryCore
Disjoint set with additional storage to track the size of each set.
| Name | FSizedDisjointSet |
| Type | struct |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Util/SizedDisjointSet.h |
| Include Path | #include "Util/SizedDisjointSet.h" |
Syntax
struct FSizedDisjointSet
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Util/SizedDisjointSet.h | |||
FSizedDisjointSet
(
int32 NumIDs |
Util/SizedDisjointSet.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Parents | TArray< int32 > | Util/SizedDisjointSet.h | ||
| Sizes | TArray< int32 > | Util/SizedDisjointSet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Create mappings between compacted Group Index and group ID, where the compacted indices numbers the groups from 0 to NumGroups | Util/SizedDisjointSet.h | ||
int32 Find
(
int32 Idx |
Find the representative cluster element for this Idx Note: Collapses parent references as it walks them, to make future Find() calls faster Use FindWithoutCollapse for a const version without this feature. | Util/SizedDisjointSet.h | |
int32 FindWithoutCollapse
(
int32 Idx |
Find w/out collapsing the upward links Note this can be less efficient over many calls, if the trees have not been collapsed by previous accesses, but it is a const access, and easier to use in parallel | Util/SizedDisjointSet.h | |
int32 GetSize
(
int32 Idx |
Util/SizedDisjointSet.h | ||
void Init
(
int32 NumIDs |
Util/SizedDisjointSet.h | ||
void Init
(
int32 NumIDs, |
IsElement(Index) returns false if Index is not valid. Find, Union and GetSize should never be called on an invalid index. | Util/SizedDisjointSet.h | |
int32 Union
(
int32 A, |
Util/SizedDisjointSet.h |