16template<
class KeyType,
class ValueType>
23 operator const KeyType&()
const {
return _Key; }
98 template <
typename Predicate>
120 template <
typename Predicate>
255 template <
bool bConst>
261 using pointer =
typename std::conditional_t<bConst, const KeyValueType*, KeyValueType*>;
262 using reference =
typename std::conditional_t<bConst, const KeyValueType&, KeyValueType&>;
267 EnsureOccupiedOrEnd();
274 if (_CurrentEntry < _End)
277 EnsureOccupiedOrEnd();
293 return _CurrentEntry !=
Other._CurrentEntry;
298 return !(*
this !=
Other);
301 template <
bool _bConst = bConst>
307 template <
bool _bConst = bConst>
313 template <
bool _bConst = bConst>
319 template <
bool _bConst = bConst>
326 void EnsureOccupiedOrEnd()
335 SEntry* _CurrentEntry;
439 const KeyType& Key =
Value;
455 if (Entry.
_Hash == 0)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ULANG_ASSERT(expr)
Definition Common.h:285
#define ULANG_FORCEINLINE
Definition Common.h:188
#define ULANG_ASSERTF(expr, format,...)
Definition Common.h:290
static ULANG_FORCEINLINE constexpr bool IsPowerOf2(const T X)
Checks if a number is a power of two.
Definition MathUtils.h:40
Definition HashTable.h:257
ULANG_FORCEINLINE Iterator & operator++()
Definition HashTable.h:272
ULANG_FORCEINLINE Iterator operator++(int)
Definition HashTable.h:283
ULANG_FORCEINLINE bool operator!=(const Iterator &Other) const
Definition HashTable.h:290
ULANG_FORCEINLINE bool operator==(const Iterator &Other) const
Definition HashTable.h:296
typename std::conditional_t< bConst, const KeyValueType &, KeyValueType & > reference
Definition HashTable.h:262
ULANG_FORCEINLINE std::enable_if_t<!_bConst, reference > operator*()
Definition HashTable.h:302
ULANG_FORCEINLINE std::enable_if_t<!_bConst, pointer > operator->()
Definition HashTable.h:314
ULANG_FORCEINLINE std::enable_if_t< _bConst, pointer > operator->() const
Definition HashTable.h:320
KeyValueType value_type
Definition HashTable.h:260
typename std::conditional_t< bConst, const KeyValueType *, KeyValueType * > pointer
Definition HashTable.h:261
std::forward_iterator_tag iterator_category
Definition HashTable.h:259
ULANG_FORCEINLINE std::enable_if_t< _bConst, reference > operator*() const
Definition HashTable.h:308
Definition HashTable.h:31
static ULANG_FORCEINLINE uint32_t ComputeNonZeroHash(const KeyType &Key)
Definition HashTable.h:391
KeyValueType & InsertInternal(KeyValueType &&KeyValue)
Definition HashTable.h:409
ULANG_FORCEINLINE uint32_t Num() const
Definition HashTable.h:68
ULANG_FORCEINLINE Iterator< false > end() const
Definition HashTable.h:360
ULANG_FORCEINLINE Iterator< true > cend() const
Definition HashTable.h:374
THashTable & operator=(THashTable Other)
Definition HashTable.h:45
KeyValueType & Insert(const KeyValueType &KeyValue)
Definition HashTable.h:134
~THashTable()
Definition HashTable.h:59
THashTable(AllocatorArgsType &&... AllocatorArgs)
Definition HashTable.h:33
KeyValueType * FindByPredicate(Predicate Pred)
Definition HashTable.h:121
ULANG_FORCEINLINE Iterator< true > cbegin() const
Definition HashTable.h:365
SEntry * _Entries
Definition HashTable.h:556
ULANG_FORCEINLINE uint32_t Lookup(const KeyType &Key) const
Definition HashTable.h:484
static constexpr uint64_t MaxLoadFactorNumerator
Definition HashTable.h:381
KeyValueType & FindOrInsert(KeyValueType &&KeyValue)
Definition HashTable.h:144
ULANG_FORCEINLINE bool Contains(const KeyType &Key) const
Definition HashTable.h:73
void Empty()
Definition HashTable.h:231
THashTable(THashTable &&Other)
Definition HashTable.h:40
ULANG_FORCEINLINE Iterator< true > begin() const
Definition HashTable.h:355
uint32_t _NumEntries
Definition HashTable.h:557
ULANG_FORCEINLINE Iterator< false > end()
Definition HashTable.h:350
void Grow()
Definition HashTable.h:534
void Swap(THashTable &Other)
Definition HashTable.h:51
THashTable(const THashTable &Other)=delete
AllocatorType _Allocator
Definition HashTable.h:562
uint32_t _NumOccupied
Definition HashTable.h:558
ULANG_FORCEINLINE Iterator< false > begin()
Definition HashTable.h:341
uint32_t InsertInternal(uint32_t Hash, KeyValueType &&Value, bool *bAlreadyExists)
Definition HashTable.h:427
ULANG_FORCEINLINE uint32_t DesiredPos(uint32_t Hash) const
Definition HashTable.h:398
void Allocate()
Definition HashTable.h:518
ULANG_FORCEINLINE KeyValueType * Find(const KeyType &Key)
Definition HashTable.h:78
bool IsEmpty() const
Definition HashTable.h:226
bool Remove(const KeyType &Key)
Definition HashTable.h:156
ULANG_FORCEINLINE uint32_t ProbeDistance(uint32_t Hash, uint32_t Pos) const
Definition HashTable.h:404
ULANG_FORCEINLINE const KeyValueType * Find(const KeyType &Key) const
Definition HashTable.h:84
const KeyValueType * FindByPredicate(Predicate Pred) const
Definition HashTable.h:99
static constexpr uint64_t MaxLoadFactorDenominator
Definition HashTable.h:382
KeyValueType & Insert(KeyValueType &&KeyValue)
Definition HashTable.h:139
Definition VVMEngineEnvironment.h:23
@ IndexNone
Definition Common.h:381
ULANG_FORCEINLINE T && ForwardArg(typename TRemoveReference< T >::Type &Obj)
Definition References.h:115
TEnableIf< TUseBitwiseSwap< T >::Value >::Type Swap(T &A, T &B)
Definition Storage.h:138
ULANG_FORCEINLINE TRemoveReference< T >::Type && Move(T &&Obj)
Definition References.h:86
U16 Index
Definition radfft.cpp:71
Definition TypeTraits.h:36
Definition HashTable.h:385
KeyValueType _KeyValue
Definition HashTable.h:387
uint32_t _Hash
Definition HashTable.h:386
Definition HashTable.h:18
bool operator==(const KeyType &Key) const
Definition HashTable.h:22
ValueType _Value
Definition HashTable.h:20
KeyType _Key
Definition HashTable.h:19