FUniqueIndexSet

[FUniqueIndexSet](API\Plugins\GeometricObjects\Util\FUniqueIndexSet) is used to construct a list of unique elements of integers in range [0, MaxValue].

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Util/UniqueIndexSet.h

Include

#include "Util/UniqueIndexSet.h"

Syntax

class FUniqueIndexSet

Remarks

FUniqueIndexSet is used to construct a list of unique elements of integers in range [0, MaxValue]. General usage is for things like converting a vertex set to the set of connected one-ring triangles. The approach is to have a bit-array for set membership, and then accumulate unique entries in a TArray.

This is faster for construction than a TSet, but does require allocating and/or clearing the bit-array. Still generally quite a bit more efficient, particularly for large sets.

Variables

Name Description

Protected variable

int64 *

 

Bits

Protected variable

int32

 

MaxIndex

Protected variable

int32

 

NumWords

Protected variable

TArray< int32 >

 

Values

Destructors

Name Description

Public function

~FUniqueIndexSet()

TODO: second bit set that tracks which blocks of ints have been set.

Functions

Name Description

Public function

bool

 

Add

(
    int32 Index
)

Add Index to the set

Public function Const

TArray< int3...

 

begin()

Range-for support. Do not directly call these functions.

Public function Const

void

 

Collect

(
    ArrayType& Storage
)

Add the members of the current index set to an object that supports .Reserve(int) and .Add(int)

Public function Const

bool

 

Contains

(
    int32 Index
)

Public function Const

TArray< int3...

 

end()

Public function Const

const TArray...

 

Indices()

Public function

void

 

Initialize

(
    int32 MaxIndexIn,
    int32 MaxValuesHint
)

Initialize the set with maximum index.

Public function Const

const int32

 

Num()

Public function

void

 

SwapValuesWith

(
    TArray< int32 >& OtherArray
)

Swap the internal TArray with another TArray.

Public function

TArray< int3...

 

TakeValues()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss