![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Disjoint set with additional storage to track the size of each set. More...
#include <SizedDisjointSet.h>
Public Member Functions | |
| FSizedDisjointSet ()=default | |
| FSizedDisjointSet (int32 NumIDs) | |
| void | Init (int32 NumIDs) |
| template<typename IsElementFunction > | |
| void | Init (int32 NumIDs, IsElementFunction IsElement) |
| int32 | Union (int32 A, int32 B) |
| int32 | Find (int32 Idx) |
| int32 | FindWithoutCollapse (int32 Idx) const |
| int32 | GetSize (int32 Idx) const |
| int32 | CompactedGroupIndexToGroupID (TArray< int32 > *CompactIdxToGroupID, TArray< int32 > *GroupIDToCompactIdx, int32 MinGroupSize=1) const |
Public Attributes | |
| TArray< int32 > | Parents |
| TArray< int32 > | Sizes |
Disjoint set with additional storage to track the size of each set.
|
default |
|
inline |
|
inline |
Create mappings between compacted Group Index and group ID, where the compacted indices numbers the groups from 0 to NumGroups
| CompactIdxToGroupID | Array to fill with the Compact Index -> Original Group ID mapping. If null, array will not be set. |
| GroupIDToCompactIdx | Array to fill with the Original Group ID -> Compact Index mapping. If null, array will not be set. |
| MinGroupSize | The minimum size of group to consider. Groups smaller than this will not be counted. |
|
inline |