Module |
|
Header |
/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Util/SmallListSet.h |
Include |
#include "Util/SmallListSet.h" |
class FSmallListSet
FSmallListSet stores a set of short integer-valued variable-size lists. The lists are encoded into a few large TDynamicVector buffers, with internal pooling, so adding/removing lists usually does not involve any or delete ops.
The lists are stored in two parts. The first N elements are stored in a linear subset of a TDynamicVector. If the list spills past these N elements, the extra elements are stored in a linked list (which is also stored in a flat array).
Each list stores its count, so list-size operations are constant time. All the internal "pointers" are 32-bit.
Name | Description | ||
---|---|---|---|
|
AllocatedCount |
Number of allocated lists |
|
|
TDynamicVector<... |
FreeBlocks |
List of free blocks as indices/offsets into block_store |
|
FreeHeadIndex |
Index of first free element in linked_store |
|
|
TDynamicVector<... |
LinkedListElements |
Flat buffer used to store linked-list "spill" elements each element is [value, next_ptr] |
|
TDynamicVector<... |
ListBlocks |
Flat buffer used to store per-list linear-memory blocks. |
|
TDynamicVector<... |
ListHeads |
Mapping from list index to offset into block_store that contains list data |
Name | Description | ||
---|---|---|---|
|
AddFreeLink ( |
Push a link-node onto the free list |
|
|
AllocateAt ( |
Create a list at the given ListIndex |
|
|
AllocateBlock() |
Grab a block from the free list, or allocate a one |
|
|
MappedValueI... |
BeginMappedValues |
|
|
ValueIterato... |
BeginValues ( |
|
|
Clear ( |
Remove all elements from the list at ListIndex |
|
|
Contains |
Search for the given Value in list at ListIndex |
|
|
MappedValueI... |
EndMappedValues |
|
|
ValueIterato... |
EndValues ( |
|
|
Enumerate ( |
Call ApplyFunc on each element of the list at ListIndex |
|
|
Find |
Search the list at ListIndex for a value where PredicateFunc(value) returns true |
|
|
First ( |
Does not check for zero-size-list! |
|
|
GetCount ( |
||
|
Insert |
Insert Value into list at ListIndex |
|
|
IsAllocated ( |
||
|
MappedValueE... |
MappedValues |
|
|
MemoryUsage() |
||
|
Move |
Move list at FromIndex to ToIndex |
|
|
Remove |
Remove Value from the list at ListIndex |
|
|
RemoveFromLinkedList |
Remove val from the linked-list attached to block_ptr |
|
|
Replace |
Search the list at ListIndex for a value where PredicateFunc(value) returns true, and replace it with NewValue |
|
|
Resize ( |
Set new number of lists |
|
|
size_t |
Size() |
|
|
ValueEnumera... |
Values ( |
Name |
Description |
|
---|---|---|
|
BaseValueIterator |
BaseValueIterator is a base class for ValueIterator and MappedValueIterator below. |
|
MappedValueEnumerable |
MappedValueEnumerable is an object that provides begin/end semantics for a small list, suitable for use with a range-based for loop |
|
MappedValueIterator |
MappedValueIterator iterates over the values of a small list An optional mapping function can be provided which will then be applied to the values returned by the * operator |
|
ValueEnumerable |
ValueEnumerable is an object that provides begin/end semantics for a small list, suitable for use with a range-based for loop |
|
ValueIterator |
ValueIterator iterates over the values of a small list |
Name |
Description |
---|---|
BLOCK_LIST_OFFSET |
Offset from start of linear-memory portion of list that contains pointer to head of variable-length linked list |
BLOCKSIZE |
Size of initial linear-memory portion of lists |
NullValue |
This value is used to indicate Null in internal pointers |