Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Experimental > API/Runtime/Core/Experimental/Containers
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Experimental/Containers/SherwoodHashTable.h |
| Include | #include "Experimental/Containers/SherwoodHashTable.h" |
Syntax
template<typename KeyType, typename ValueType, typename KeyFuncs>
struct TSherwoodHashTable
Remarks
Implementation of Robin Hood hash table based on sherwood_v3_table by Malte Skarupke. Good for small keys and values. If key is already a high quality hash, then identity hash function should be used. Current limitations:
- Requires key and value to be trivial types.
- Does not allow move or copy.
- Does not support custom allocators.
Variables
Constructors
| Type | Name | Description | |
|---|---|---|---|
| NOTE: Non-trivial type support, move and copy ops are not implemented yet, but can be. | |||
TSherwoodHashTable
(
const TSherwoodHashTable& |
|||
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| ValueType * | |||
| FData | AllocateData
(
uint32 Count |
||
| T * | AllocateUninitialized
(
uint32 Count |
||
| uint8 | ComputeMaxLookups
(
uint32 InNumSlots |
||
| void | Deallocate
(
void* Ptr |
||
| void | DeallocateData
(
FData& Data |
||
| void | Empty () |
||
| TTuple< const KeyType *, ValueType * > | Find
(
KeyType Key |
||
| ValueType * | FindOrAdd
(
KeyType Key, |
||
| ValueType * | FindOrAddByHash
(
KeyType Key, |
||
| void | Grow () |
||
| uint32 | NumSlots () |
||
| void | |||
| void | |||
| void | Reset () |
Operators
| Type | Name | Description | |
|---|---|---|---|
| TSherwoodHashTable & | operator=
(
const TSherwoodHashTable& |
||
| TSherwoodHashTable & | operator=
(
TSherwoodHashTable&& |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FData |
Typedefs
| Name | Description |
|---|---|
| HashType |
Constants
| Name | Description |
|---|---|
| bIsMap | TSherwoodHashTable can be used to implement a set or a map. |
| MaxLoadFactor | Ratio between number of stored elements and allocated capacity beyond which the container will be grown (doubled in size). |
| MinNumLookups | Minimum probing distance when searching for an entry slot. |
| MinNumSlots | Smallest capacity of non-empty container. |