421template<
typename TAllocator,
422 typename TValueDescriptor,
423 typename THash = std::hash <typename TValueDescriptor::KeyType>,
424 typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>,
426 Recycling TRecycling = Recycling::Private >
429 THashCaching, TRecycling > {
432 #if ALIB_DEBUG_CRITICAL_SECTIONS
434 #define DCS ALIB_DCS_WITH(dcs)
435 #define DCSSHRD ALIB_DCS_SHARED_WITH(dcs)
446 using Element =
typename base::Element;
447 using Node =
typename base::Node;
471 using KeyType =
typename TValueDescriptor::KeyType;
505 static constexpr bool IsRecycling() {
return recyclerType::IsRecycling(); }
511 using Iterator =
typename base::template TIterator < StoredType>;
573 other.element=
nullptr;
618 template<
bool TRequires= TRecycling!= Recycling::Shared>
622 float pBaseLoadFactor = 1.0,
623 float pMaxLoadFactor = 2.0 )
624 :
base( pAllocator, pBaseLoadFactor, pMaxLoadFactor )
640 template<
bool TRequires= TRecycling!= Recycling::Shared>
644 float pMaxLoadFactor = 2.0 )
645 :
base( pBaseLoadFactor, pMaxLoadFactor )
660 template<
typename TSharedRecycler= SharedRecyclerType>
661 requires (!std::same_as<TSharedRecycler, void>)
663 TSharedRecycler& pSharedRecycler,
664 float pBaseLoadFactor = 1.0,
665 float pMaxLoadFactor = 2.0 )
666 :
base( pAllocator, pSharedRecycler, pBaseLoadFactor, pMaxLoadFactor )
679 template<
typename TSharedRecycler= SharedRecyclerType>
680 requires (!std::same_as<TSharedRecycler, void>)
682 float pBaseLoadFactor = 1.0,
683 float pMaxLoadFactor = 2.0 )
684 :
base( pSharedRecycler, pBaseLoadFactor, pMaxLoadFactor )
725 auto& allocator = base::base::GetAllocator();
727 if constexpr ( std::same_as<
typename base::recyclerType,
741 bool IsEmpty() const noexcept {
return base::size == 0; }
751 return base::rehash(
uinteger(std::ceil( expectedSize / base::baseLoadFactor)) );
765 Reserve( expected, reference );
769 - base::recyclerType::Count();
770 if( requiredRecyclables > 0 )
771 recyclerType::Reserve( requiredRecyclables );
785 {DCSSHRD
return base::recyclerType::Count(); }
811 { base::baseLoadFactor= newBaseLoadFactor; }
842 { base::setMaxLoadFactor( newMaxLoadFactor ); }
868 "Bucket number out of range. {}>={}", bucketNumber, base::bucketCount )
869 return uinteger(base::buckets[bucketNumber].count());
877 {
return THash{}(key) % base::bucketCount; }
887 {
return Insert(value, THash{}(TValueDescriptor().Key(
const_cast<StoredType&
>(value)))); }
899 {
return Insert(value, hashCode ); }
913 auto hashCode = THash{}( TValueDescriptor().Key(
static_cast<StoredType&
>(value)) );
914 return Insert( std::move(value), hashCode );
928 Element* element= base::allocElement(hashCode);
931 new ( &element->value )
StoredType ( std::move(value) );
934 base::increaseSize( 1 );
935 auto bucketIdx= base::insertInBucket( element, hashCode );
936 return Iterator(
this, bucketIdx, element);
958 if( handle.IsEmpty() )
961 base::increaseSize( 1 );
962 Element* element= handle.element;
963 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
964 element->fixHashCode( hashCode );
965 auto bucketIdx= base::insertInBucket( element, hashCode );
966 handle.element=
nullptr;
967 return Iterator(
this, bucketIdx, element );
1015 auto hashCode = THash{}( TValueDescriptor().Key(
static_cast<StoredType&
>(value)) );
1030 Element* element = base::allocElement( hashCode );
1032 base::increaseSize( 1 );
1033 auto bucketIdx= hashCode % base::bucketCount;
1034 base::buckets[bucketIdx].pushFront( element );
1036 new ( &element->value )
StoredType( std::move(value) );
1041 ALIB_ASSERT( it.element == element,
"MONOMEM/HASHTABLE" )
1042 while( ++it !=
cend(bucketIdx) ) {
1044 "InsertUnique used while element with same key-portion existed!" )
1048 return Iterator(
this, bucketIdx, element);
1066 template<
typename TRequires= MappedType>
1067 requires(!std::same_as<TRequires, StoredType>)
1089 template<
typename TRequires= MappedType>
1090 requires(!std::same_as<TRequires, StoredType>)
1092 {
return InsertOrAssign( key, std::move(mapped), THash{}(key) ); }
1113 template<
typename TRequires= MappedType>
1114 requires(!std::same_as<TRequires, StoredType>)
1117 std::pair<Iterator, bool> result= base::insertOrGet( key, hashCode );
1120 if( result.second ==
false )
1121 lang::Destruct( TValueDescriptor().Mapped( result.first.element->value ) );
1125 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1128 new ( &TValueDescriptor().Mapped( result.first.element->value ) )
MappedType( std::move( mapped) );
1148 template<
typename TRequires= MappedType>
1149 requires(!std::same_as<TRequires, StoredType>)
1173 template<
typename TRequires= MappedType>
1174 requires(!std::same_as<TRequires, StoredType>)
1178 std::pair<Iterator, bool> result= base::insertIfNotExists( key, hashCode );
1181 if( result.second ==
false )
1185 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1188 new ( &TValueDescriptor().Mapped( result.first.element->value ) )
MappedType( std::move( mapped) );
1212 template<
typename TRequires= MappedType>
1213 requires(!std::same_as<TRequires, StoredType>)
1240 auto hashCode= THash{}( TValueDescriptor().Key(value) );
1259 std::pair<Iterator, bool> result= base::insertIfNotExists( TValueDescriptor().Key(value), hashCode );
1262 if( result.second ==
false )
1266 new ( &result.first.element->value )
StoredType( std::move(value) );
1295 if( handle.IsEmpty() )
1296 return Iterator(
this, base::bucketCount,
nullptr );
1298 Element* element = handle.element;
1299 auto hashCode = THash{}( TValueDescriptor().Key( handle.element->value ) );
1300 auto bucketIdx= hashCode % base::bucketCount;
1302 Element* existing= base::findElement( hashCode, TValueDescriptor().Key( element->value ), hashCode );
1303 if ( existing !=
nullptr )
1304 return Iterator(
this, bucketIdx, existing );
1306 handle.element=
nullptr;
1307 element->fixHashCode( hashCode );
1309 bucketIdx= base::increaseSize( 1, hashCode );
1310 base::buckets[bucketIdx].pushFront( element );
1311 return Iterator(
this, bucketIdx, element);
1325 template<
typename... TArgs>
1328 Element* element= base::allocElement( 0 );
1331 new ( &element->value )
StoredType( std::forward<TArgs>(args)... );
1334 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
1335 element->fixHashCode( hashCode );
1338 base::increaseSize( 1 );
1339 auto bucketIdx= base::insertInBucket( element, hashCode );
1340 return Iterator(
this, bucketIdx, element);
1366 template<
typename... TArgs>
1369 Element* element= base::allocElement(0);
1372 new ( &element->value )
StoredType( std::forward<TArgs>(args)... );
1375 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
1376 element->fixHashCode( hashCode );
1380 auto bucketIdx= base::increaseSize( 1, hashCode );
1381 base::buckets[bucketIdx].pushFront( element );
1382 auto result=
Iterator(
this, bucketIdx, element);
1386 auto it=
ConstLocalIterator( result.bucketIdx, base::buckets[result.bucketIdx].first() );
1387 ALIB_ASSERT( it.element == result.element,
"MONOMEM/HASHTABLE" )
1389 ALIB_ASSERT_ERROR( !base::areEqual(result.element, it.element ),
"MONOMEM/HASHTABLE",
1390 "EmplaceUnique used while element with same key-portion existed!" )
1422 template<
typename TRequires=
MappedType,
typename... TArgs>
1423 requires(!std::same_as<TRequires, StoredType>)
1426 template<
typename TRequires=
MappedType,
typename... TArgs>
1427 requires(!std::same_as<TRequires, StoredType>)
1430 std::pair<Iterator, bool> result= base::insertOrGet( key, THash{}(key) );
1433 if( result.second ==
false )
1434 lang::Destruct( TValueDescriptor().Mapped( result.first.element->value ) );
1438 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1441 new ( &TValueDescriptor().Mapped( result.first.element->value ))
MappedType( std::forward<TArgs>( args)... );
1447 template<
typename TRequires=
MappedType,
typename... TArgs>
1448 requires( std::same_as<TRequires, StoredType>
1451 TArgs&&... >::value )
1454 std::pair<Iterator, bool> result= base::insertOrGet( key, THash{}(key) );
1457 if( result.second ==
false )
1461 new (&result.first.element->value)
StoredType( key, std::forward<TArgs>( args)... );
1501 template<
typename TRequires=
MappedType,
typename... TArgs>
1502 requires ( std::same_as<TRequires, StoredType>
1503 && std::is_move_constructible<StoredType>::value )
1505 StoredType value( std::forward<TArgs>( args)... );
1508 std::pair<Iterator, bool> result= base::insertIfNotExists( TValueDescriptor().Key(value),
1509 THash{}(TValueDescriptor().Key(value)) );
1512 if( result.second ==
false )
1516 new ( &result.first.element->value )
StoredType( std::move(value) );
1546 template<
typename... TArgs>
1549 template<
typename... TArgs>
1550 requires( !std::is_constructible<
StoredType,
const KeyType&, TArgs&&... >::value )
1553 std::pair<Iterator, bool> result= base::insertIfNotExists( key, THash{}(key) );
1556 if( result.second ==
false )
1560 new (&TValueDescriptor().Key(result.first.element->value))
KeyType( key );
1563 new (&TValueDescriptor().Mapped(result.first.element->value))
MappedType( std::forward<TArgs>( args)... );
1568 template<
typename... TArgs>
1569 requires(std::is_constructible<
StoredType,
const KeyType&, TArgs&&...>::value )
1572 std::pair<Iterator, bool> result= base::insertIfNotExists( key, THash{}(key) );
1575 if( result.second ==
false )
1579 new (&result.first.element->value)
StoredType( key, std::forward<TArgs>( args)... );
1604 auto hashCode = THash{}(key);
1605 auto bucketIdx= hashCode % base::bucketCount;
1606 Element* elem = base::findElement( bucketIdx, key, hashCode );
1607 return Iterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1615 auto hashCode = THash{}(key);
1616 auto bucketIdx= hashCode % base::bucketCount;
1617 Element* elem = base::findElement( bucketIdx, key, hashCode );
1618 return ConstIterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1632 auto bucketIdx= hashCode % base::bucketCount;
1633 Element* elem = base::findElement( bucketIdx, key, hashCode );
1634 return Iterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1648 auto bucketIdx= hashCode % base::bucketCount;
1649 Element* elem = base::findElement( bucketIdx, key, hashCode );
1650 return ConstIterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1658 auto hashCode= THash{}(key);
1659 return base::findElement(hashCode % base::bucketCount, key, hashCode )
1671 {DCSSHRD
return base::findRange( key ); }
1681 {DCSSHRD
return base::findRange( key ); }
1714 Node* previous= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1715 if( previous ==
nullptr )
1716 return ElementHandle(
this,
nullptr);
1718 Element* element= previous->next();
1719 previous->removeNext();
1721 return ElementHandle(
this, element );
1742 && pos.table !=
nullptr ,
1743 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1745 Node* previous= base::buckets[pos.bucketIdx].findLastBefore( pos.element );
1747 "Illegal iterator: Element not found." )
1751 return ElementHandle(
this, pos.element );
1771 Node* beforeFirst= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1772 if( beforeFirst ==
nullptr )
1777 while(
end && base::areEqual(
end, key, hashCode ) )
1781 auto result= base::recyclerType::RecycleList(beforeFirst->next(),
end);
1782 beforeFirst->next(
end );
1784 base::size-= result.second;
1785 return result.second;
1815 Node* before= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1816 if( before ==
nullptr )
1820 || !base::areEqual( before->next()->next(), key, hashCode ),
1821 "MONOMEM/HASHTABLE",
"More than one element found matching the given key" )
1823 Element* elem= before->removeNext();
1824 base::recyclerType::Recycle(elem);
1842 && pos.table !=
nullptr ,
1843 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1845 Iterator result(
this, pos.bucketIdx, pos.element );
1849 Node* previous= base::buckets[pos.bucketIdx].findLastBefore( pos.element );
1851 "Illegal iterator: Element not found." )
1855 base::recyclerType::Recycle(toDelete);
1873 && start.table !=
nullptr ,
1874 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1877 "Iterators are referring to different hash tables." )
1879 if( start.element ==
end.element )
1880 return Iterator(
this, start.bucketIdx, start.element );
1883 for(
uinteger bucketIdx= start.bucketIdx; bucketIdx <=
end.bucketIdx; ++bucketIdx ) {
1885 if( bucketIdx == base::bucketCount )
1890 if( bucketIdx == start.bucketIdx ) {
1892 previous= base::buckets[start.bucketIdx].findLastBefore( start.element );
1894 "Illegal iterator: Element not found." )
1897 if( base::buckets[bucketIdx].isEmpty() )
1899 previous= &base::buckets[bucketIdx];
1903 if ( bucketIdx <
end.bucketIdx ) {
1904 base::size-= previous->count();
1905 base::recyclerType::RecycleList( previous->next() );
1906 previous->next(
nullptr );
1908 auto pair= base::recyclerType::RecycleList(previous->next(),
end.element );
1909 previous->next(
end.element );
1910 base::size-= pair.second;
1927 ALIB_ASSERT_ERROR( pos.element !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1931 Element* element= pos.element;
1932 base::buckets[pos.bucketIdx].findAndRemove( element );
1933 base::recyclerType::Recycle( element);
1949 ALIB_ASSERT_ERROR( start.element !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1951 Node* previous= base::buckets[start.bucketIdx].findLastBefore( start.element );
1952 ALIB_ASSERT_ERROR( previous !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1953 if( start.element ==
end.element )
1956 previous->next(
end.element );
1957 auto pair= base::recyclerType::RecycleList( start.element,
end.element );
1959 base::size-= pair.second;
1998 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
1999 return LocalIterator( bucketNumber, base::buckets[bucketNumber].first() );
2008 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2018 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2028 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2038 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2048 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2059#if ALIB_DEBUG_CONTAINERS
2081template<
typename THashtable>
2083std::tuple<double,double,integer,integer>
2085 auto qtyBuckets = hashtable.BucketCount();
2086 double averageExpected = double(hashtable.Size()) / double(qtyBuckets);
2087 uinteger minimum = std::numeric_limits<uinteger>::max();
2088 uinteger maximum = std::numeric_limits<uinteger>::min();
2091 for(
uinteger i= 0 ; i < qtyBuckets ; ++i ) {
2092 auto bucketSize= hashtable.BucketSize( i );
2093 sumCheck+= bucketSize;
2094 if( minimum > bucketSize ) minimum= bucketSize;
2095 if( maximum < bucketSize ) maximum= bucketSize;
2097 double diff= averageExpected - double(bucketSize);
2098 diffs+= diff > 0 ? diff : - diff;
2102 "Error: Hashtable::Size() and sum of bucket sizes differ: {}!={}", hashtable.Size(),sumCheck )
2103 double deviation= diffs / double(qtyBuckets);
2105 return std::make_tuple( averageExpected, deviation, minimum, maximum );
2151template<
typename TAllocator,
2153 typename THash = std::hash <T>,
2154 typename TEqual = std::equal_to<T>,
2156 Recycling TRecycling = Recycling::Private >
2197template<
typename TAllocator,
2200 typename THash = std::hash <TKey>,
2201 typename TEqual = std::equal_to<TKey>,
2203 Recycling TRecycling = Recycling::Private >
2213template<
typename TAllocator,
2214 typename TValueDescriptor,
2215 typename THash = std::hash <typename TValueDescriptor::KeyType>,
2216 typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>,
2218 Recycling TRecycling = Recycling::Private >
2222template<
typename TAllocator,
2224 typename THash = std::hash <T>,
2225 typename TEqual = std::equal_to<T>,
2227 Recycling TRecycling = Recycling::Private >
2231template<
typename TAllocator,
2234 typename THash = std::hash <TKey>,
2235 typename TEqual = std::equal_to<TKey>,
2237 Recycling TRecycling = Recycling::Private >
2242#if ALIB_DEBUG_CRITICAL_SECTIONS
#define ALIB_ASSERT(cond, domain)
#define ALIB_DEBUG_CRITICAL_SECTIONS
#define ALIB_POP_ALLOWANCE
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_ALLOW_NOTHING_RETURNED
StoredType & Value() const
ElementHandle & operator=(ElementHandle &&other)
HashTable * table
The table we belong to.
ElementHandle(ElementHandle &other)=delete
Deleted copy constructor.
ElementHandle(HashTable *pTable, Element *pElement)
ElementHandle()
Default constructor creating and empty handle.
ElementHandle(ElementHandle &&other)
Element * element
The extracted element.
MappedType & Mapped() const
ALIB_ALLOW_NOTHING_RETURNED Iterator erase(ConstIterator start, ConstIterator end)
float BaseLoadFactor() const noexcept
ConstIterator end() const
Iterator EmplaceUnique(TArgs &&... args)
std::pair< Iterator, bool > InsertOrAssign(const KeyType &key, MappedType &&mapped, size_t hashCode)
std::pair< Iterator, bool > InsertIfNotExistent(const KeyType &key, MappedType &&mapped)
std::pair< Iterator, bool > InsertIfNotExistent(const StoredType &value)
Iterator Insert(StoredType &&value, size_t hashCode)
ConstIterator cbegin() const
std::pair< Iterator, bool > EmplaceIfNotExistent(const KeyType &key, TArgs &&... args)
std::pair< ConstIterator, ConstIterator > EqualRange(const KeyType &key) const
bool EraseUnique(const KeyType &key, size_t hashCode)
bool Contains(const KeyType &key) const
ConstIterator cend() const
ConstLocalIterator begin(uinteger bucketNumber) const
static constexpr bool IsRecycling()
typename TValueDescriptor::MappedType MappedType
AllocatorType & GetAllocator() noexcept
std::pair< Iterator, bool > InsertIfNotExistent(const KeyType &key, const MappedType &mapped)
Iterator Find(const KeyType &key, size_t hashCode)
std::pair< Iterator, bool > InsertOrAssign(const KeyType &key, const MappedType &mapped)
Iterator Insert(ElementHandle &handle)
void ReserveRecyclables(integer expected, lang::ValueReference reference)
uinteger BucketSize(uinteger bucketNumber) const noexcept
std::pair< Iterator, bool > EmplaceOrAssign(const KeyType &key, TArgs &&... args)
integer RecyclablesCount() const noexcept
Iterator Insert(StoredType &&value)
Iterator Insert(const StoredType &value, size_t hashCode)
Iterator InsertUnique(const StoredType &value, size_t hashCode)
Iterator Find(const KeyType &key)
static constexpr bool IsCachingHashes()
Iterator Insert(const StoredType &value)
std::pair< Iterator, bool > InsertIfNotExistent(StoredType &&value, size_t hashCode)
typename base::template TLocalIterator< const StoredType > ConstLocalIterator
The constant iterator for a single bucket exposed by this container.
uinteger BucketNumber(const KeyType &key) const noexcept
std::pair< Iterator, bool > EmplaceIfNotExistent(TArgs &&... args)
ConstLocalIterator cend(uinteger bucketNumber) const
typename TValueDescriptor::StoredType StoredType
TValueDescriptor DescriptorType
Type definition publishing template parameter TValueDescriptor.
integer erase(const KeyType &key)
void BaseLoadFactor(float newBaseLoadFactor) noexcept
bool IsEmpty() const noexcept
void MaxLoadFactor(float newMaxLoadFactor) noexcept
integer Erase(const KeyType &key, size_t hashCode)
ALIB_POP_ALLOWANCE LocalIterator erase(ConstLocalIterator pos)
ConstIterator begin() const
std::pair< Iterator, Iterator > EqualRange(const KeyType &key)
ConstIterator Find(const KeyType &key) const
ElementHandle Extract(const KeyType &key, size_t hashCode)
HashTable(AllocatorType &pAllocator, TSharedRecycler &pSharedRecycler, float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
ElementHandle Extract(const KeyType &key)
TAllocator AllocatorType
Type definition publishing template parameter TAllocator.
Iterator InsertUnique(const StoredType &value)
ElementHandle Extract(ConstIterator pos)
Iterator InsertUnique(StoredType &&value)
float MaxLoadFactor() const noexcept
HashTable(float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
ConstLocalIterator end(uinteger bucketNumber) const
void Reserve(integer expected, lang::ValueReference reference)
LocalIterator erase(ConstLocalIterator start, ConstLocalIterator end)
HashTable(AllocatorType &pAllocator, float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
typename base::SharedRecyclerType SharedRecyclerType
THash HashType
Type definition publishing template parameter THash.
ConstIterator Find(const KeyType &key, size_t hashCode) const
typename TValueDescriptor::KeyType KeyType
HashTable(TSharedRecycler &pSharedRecycler, float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
LocalIterator begin(uinteger bucketNumber)
std::pair< Iterator, bool > InsertOrAssign(const KeyType &key, MappedType &&mapped)
typename base::template TIterator< StoredType > Iterator
The mutable iterator exposed by this container.
std::pair< Iterator, bool > InsertIfNotExistent(StoredType &&value)
LocalIterator end(uinteger bucketNumber)
Iterator InsertUnique(StoredType &&value, size_t hashCode)
typename base::recyclerType recyclerType
The recycler type.
integer Size() const noexcept
typename base::template TLocalIterator< StoredType > LocalIterator
The mutable iterator for a single bucket exposed by this container.
Iterator InsertIfNotExistent(ElementHandle &handle)
TEqual EqualType
Type definition publishing template parameter TEqual.
typename base::template TIterator< const StoredType > ConstIterator
The constant iterator exposed by this container.
Iterator erase(ConstIterator pos)
ConstLocalIterator cbegin(uinteger bucketNumber) const
std::pair< Iterator, bool > InsertIfNotExistent(const KeyType &key, MappedType &&mapped, size_t hashCode)
uinteger BucketCount() const noexcept
Iterator Emplace(TArgs &&... args)
alib::containers::HashTable< TAllocator, TIdentDescriptor< T >, THash, TEqual, THashCaching, TRecycling >< TAllocator, T, THash, TEqual, THashCaching, TRecycling >::CachedHashCodes static constexpr bool CachedHashCodes
bool EraseUnique(const KeyType &key)
static constexpr Recycling RecyclingTag()
std::tuple< double, double, integer, integer > DbgGetHashTableDistribution(const THashtable &hashtable)
HashTable< TAllocator, TIdentDescriptor< T >, THash, TEqual, THashCaching, TRecycling > HashSet
HashTable< TAllocator, TPairDescriptor< TKey, TMapped >, THash, TEqual, THashCaching, TRecycling > HashMap
Caching
Denotes if a cache mechanism is enabled or disabled.
ValueReference
Denotes if a value is interpreted as an absolute or relative number.
@ Relative
Referring to a relative value.
@ Absolute
Referring to an absolute value.
containers::HashSet< TAllocator, T, THash, TEqual, THashCaching, TRecycling > HashSet
Type alias in namespace #"%alib". See type definition #"alib::containers::HashSet".
containers::HashTable< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling > HashTable
Type alias in namespace #"%alib". See type definition #"alib::containers::HashSet".
lang::integer integer
Type alias in namespace #"%alib".
containers::HashMap< TAllocator, TKey, TMapped, THash, TEqual, THashCaching, TRecycling > HashMap
Type alias in namespace #"%alib".
containers::Recycling Recycling
Type alias in namespace #"%alib".
lang::uinteger uinteger
Type alias in namespace #"%alib".
typename HTElementSelector< TValueDescriptor, THashCaching >::Type Element
The type stored in the bucket of class #"%HashTable".
float baseLoadFactor
The load factor that is set when the table is rehashed automatically.
typename RecyclingSelector< TRecycling >::template Type< TAllocator, typename HTElementSelector< TValueDescriptor, THashCaching >::Type > base
Our base type.
lang::SidiNodeBase< Element > Node
Type of a node in the #"%List".
TElement * removeNext() noexcept