![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SherwoodHashTable.h>
Classes | |
| struct | FData |
Public Types | |
| using | HashType = uint32 |
Public Member Functions | |
| TSherwoodHashTable ()=default | |
| TSherwoodHashTable (const TSherwoodHashTable &)=delete | |
| TSherwoodHashTable (TSherwoodHashTable &&)=delete | |
| TSherwoodHashTable & | operator= (const TSherwoodHashTable &)=delete |
| TSherwoodHashTable & | operator= (TSherwoodHashTable &&)=delete |
| ~TSherwoodHashTable () | |
| void | Reset () |
| void | Empty () |
| uint32 | NumSlots () const |
| FORCEINLINE_DEBUGGABLE TTuple< const KeyType *, ValueType * > | Find (KeyType Key) const |
| FORCEINLINE_DEBUGGABLE ValueType * | FindOrAdd (KeyType Key, ValueType Value, bool *bIsAlreadyInContainerPtr=nullptr) |
| FORCEINLINE_DEBUGGABLE ValueType * | FindOrAddByHash (KeyType Key, HashType Hash, ValueType Value, bool *bIsAlreadyInContainerPtr=nullptr) |
| FORCENOINLINE ValueType * | Add (int8 Distance, FData &Data, uint32 Cursor, KeyType Key, HashType Hash, ValueType Value) |
| void | Rehash (uint32 DesiredNumSlots) |
| void | Grow () |
| void | Reserve (uint32 DesiredNumElements) |
Static Public Member Functions | |
| template<typename T > | |
| static T * | AllocateUninitialized (uint32 Count) |
| static void | Deallocate (void *Ptr) |
| static void | DeallocateData (FData &Data) |
| static uint8 | ComputeMaxLookups (uint32 InNumSlots) |
| static FData | AllocateData (uint32 Count) |
Public Attributes | |
| FData | CurrentData |
| uint32 | NumSlotsMinusOne = 0 |
| int8 | MaxLookups = 0 |
| int32 | NumElements = 0 |
Static Public Attributes | |
| static constexpr bool | bIsMap = !std::is_same_v<ValueType, FNoopStruct> |
| static constexpr uint32 | MinNumLookups = 4 |
| static constexpr uint32 | MinNumSlots = 4 |
| static constexpr float | MaxLoadFactor = 0.9f |
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:
| using Experimental::TSherwoodHashTable_Private::TSherwoodHashTable< KeyType, ValueType, KeyFuncs >::HashType = uint32 |
|
default |
|
delete |
|
delete |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
delete |
|
delete |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |
| FData Experimental::TSherwoodHashTable_Private::TSherwoodHashTable< KeyType, ValueType, KeyFuncs >::CurrentData |
|
staticconstexpr |
| int8 Experimental::TSherwoodHashTable_Private::TSherwoodHashTable< KeyType, ValueType, KeyFuncs >::MaxLookups = 0 |
|
staticconstexpr |
|
staticconstexpr |
| int32 Experimental::TSherwoodHashTable_Private::TSherwoodHashTable< KeyType, ValueType, KeyFuncs >::NumElements = 0 |
| uint32 Experimental::TSherwoodHashTable_Private::TSherwoodHashTable< KeyType, ValueType, KeyFuncs >::NumSlotsMinusOne = 0 |