419template<
typename TAllocator,
420 typename TValueDescriptor,
421 typename THash = std::hash <typename TValueDescriptor::KeyType>,
422 typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>,
424 Recycling TRecycling = Recycling::Private >
429 #if ALIB_DEBUG_CRITICAL_SECTIONS
431 #define DCS ALIB_DCS_WITH(dcs)
432 #define DCSSHRD ALIB_DCS_SHARED_WITH(dcs)
443 using Element =
typename base::Element;
444 using Node =
typename base::Node;
468 using KeyType =
typename TValueDescriptor::KeyType;
502 static constexpr bool IsRecycling() {
return recyclerType::IsRecycling(); }
508 using Iterator =
typename base::template TIterator < StoredType>;
571 other.element=
nullptr;
616 template<
bool TRequires= TRecycling!= Recycling::Shared>
620 float pBaseLoadFactor = 1.0,
621 float pMaxLoadFactor = 2.0 )
622 :
base( pAllocator, pBaseLoadFactor, pMaxLoadFactor )
638 template<
bool TRequires= TRecycling!= Recycling::Shared>
642 float pMaxLoadFactor = 2.0 )
643 :
base( pBaseLoadFactor, pMaxLoadFactor )
658 template<
typename TSharedRecycler= SharedRecyclerType>
659 requires (!std::same_as<TSharedRecycler, void>)
661 TSharedRecycler& pSharedRecycler,
662 float pBaseLoadFactor = 1.0,
663 float pMaxLoadFactor = 2.0 )
664 :
base( pAllocator, pSharedRecycler, pBaseLoadFactor, pMaxLoadFactor )
677 template<
typename TSharedRecycler= SharedRecyclerType>
678 requires (!std::same_as<TSharedRecycler, void>)
680 float pBaseLoadFactor = 1.0,
681 float pMaxLoadFactor = 2.0 )
682 :
base( pSharedRecycler, pBaseLoadFactor, pMaxLoadFactor )
723 auto& allocator = base::base::GetAllocator();
725 if constexpr ( std::same_as<
typename base::recyclerType,
739 bool IsEmpty() const noexcept {
return base::size == 0; }
749 return base::rehash(
uinteger(std::ceil( expectedSize / base::baseLoadFactor)) );
763 Reserve( expected, reference );
767 - base::recyclerType::Count();
768 if( requiredRecyclables > 0 )
769 recyclerType::Reserve( requiredRecyclables );
783 {DCSSHRD
return base::recyclerType::Count(); }
809 { base::baseLoadFactor= newBaseLoadFactor; }
840 { base::setMaxLoadFactor( newMaxLoadFactor ); }
866 "Bucket number out of range. {}>={}", bucketNumber, base::bucketCount )
867 return uinteger(base::buckets[bucketNumber].count());
875 {
return THash{}(key) % base::bucketCount; }
885 {
return Insert(value, THash{}(TValueDescriptor().Key(
reinterpret_cast<StoredType&
>(value)))); }
897 {
return Insert(value, hashCode ); }
911 auto hashCode = THash{}( TValueDescriptor().Key(
reinterpret_cast<StoredType&
>(value)) );
912 return Insert( std::move(value), hashCode );
926 Element* element= base::allocElement(hashCode);
929 new ( &element->value )
StoredType ( std::move(value) );
932 base::increaseSize( 1 );
933 auto bucketIdx= base::insertInBucket( element, hashCode );
934 return Iterator(
this, bucketIdx, element);
955 if( handle.IsEmpty() )
958 base::increaseSize( 1 );
959 Element* element= handle.element;
960 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
961 element->fixHashCode( hashCode );
962 auto bucketIdx= base::insertInBucket( element, hashCode );
963 handle.element=
nullptr;
964 return Iterator(
this, bucketIdx, element );
1013 auto hashCode = THash{}( TValueDescriptor().Key(
reinterpret_cast<StoredType&
>(value)) );
1028 Element* element = base::allocElement( hashCode );
1030 base::increaseSize( 1 );
1031 auto bucketIdx= hashCode % base::bucketCount;
1032 base::buckets[bucketIdx].pushFront( element );
1034 new ( &element->value )
StoredType( std::move(value) );
1039 ALIB_ASSERT( it.element == element,
"MONOMEM/HASHTABLE" )
1040 while( ++it !=
cend(bucketIdx) ) {
1042 "InsertUnique used while element with same key-portion existed!" )
1046 return Iterator(
this, bucketIdx, element);
1064 template<
typename TRequires= MappedType>
1065 requires(!std::same_as<TRequires, StoredType>)
1087 template<
typename TRequires= MappedType>
1088 requires(!std::same_as<TRequires, StoredType>)
1090 {
return InsertOrAssign( key, std::move(mapped), THash{}(key) ); }
1111 template<
typename TRequires= MappedType>
1112 requires(!std::same_as<TRequires, StoredType>)
1115 std::pair<Iterator, bool> result= base::insertOrGet( key, hashCode );
1118 if( result.second ==
false )
1119 lang::Destruct( TValueDescriptor().Mapped( result.first.element->value ) );
1123 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1126 new ( &TValueDescriptor().Mapped( result.first.element->value ) )
MappedType( std::move( mapped) );
1146 template<
typename TRequires= MappedType>
1147 requires(!std::same_as<TRequires, StoredType>)
1171 template<
typename TRequires= MappedType>
1172 requires(!std::same_as<TRequires, StoredType>)
1176 std::pair<Iterator, bool> result= base::insertIfNotExists( key, hashCode );
1179 if( result.second ==
false )
1183 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1186 new ( &TValueDescriptor().Mapped( result.first.element->value ) )
MappedType( std::move( mapped) );
1210 template<
typename TRequires= MappedType>
1211 requires(!std::same_as<TRequires, StoredType>)
1238 auto hashCode= THash{}( TValueDescriptor().Key(value) );
1257 std::pair<Iterator, bool> result= base::insertIfNotExists( TValueDescriptor().Key(value), hashCode );
1260 if( result.second ==
false )
1264 new ( &result.first.element->value )
StoredType( std::move(value) );
1293 if( handle.IsEmpty() )
1294 return Iterator(
this, base::bucketCount,
nullptr );
1296 Element* element = handle.element;
1297 auto hashCode = THash{}( TValueDescriptor().Key( handle.element->value ) );
1298 auto bucketIdx= hashCode % base::bucketCount;
1300 Element* existing= base::findElement( hashCode, TValueDescriptor().Key( element->value ), hashCode );
1301 if ( existing !=
nullptr )
1302 return Iterator(
this, bucketIdx, existing );
1304 handle.element=
nullptr;
1305 element->fixHashCode( hashCode );
1307 bucketIdx= base::increaseSize( 1, hashCode );
1308 base::buckets[bucketIdx].pushFront( element );
1309 return Iterator(
this, bucketIdx, element);
1323 template<
typename... TArgs>
1326 Element* element= base::allocElement( 0 );
1329 new ( &element->value )
StoredType( std::forward<TArgs>(args)... );
1332 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
1333 element->fixHashCode( hashCode );
1336 base::increaseSize( 1 );
1337 auto bucketIdx= base::insertInBucket( element, hashCode );
1338 return Iterator(
this, bucketIdx, element);
1364 template<
typename... TArgs>
1367 Element* element= base::allocElement(0);
1370 new ( &element->value )
StoredType( std::forward<TArgs>(args)... );
1373 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
1374 element->fixHashCode( hashCode );
1378 auto bucketIdx= base::increaseSize( 1, hashCode );
1379 base::buckets[bucketIdx].pushFront( element );
1380 auto result=
Iterator(
this, bucketIdx, element);
1384 auto it=
ConstLocalIterator( result.bucketIdx, base::buckets[result.bucketIdx].first() );
1385 ALIB_ASSERT( it.element == result.element,
"MONOMEM/HASHTABLE" )
1387 ALIB_ASSERT_ERROR( !base::areEqual(result.element, it.element ),
"MONOMEM/HASHTABLE",
1388 "EmplaceUnique used while element with same key-portion existed!" )
1420 template<
typename TRequires=
MappedType,
typename... TArgs>
1421 requires(!std::same_as<TRequires, StoredType>)
1424 template<
typename TRequires=
MappedType,
typename... TArgs>
1425 requires(!std::same_as<TRequires, StoredType>)
1428 std::pair<Iterator, bool> result= base::insertOrGet( key, THash{}(key) );
1431 if( result.second ==
false )
1432 lang::Destruct( TValueDescriptor().Mapped( result.first.element->value ) );
1436 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1439 new ( &TValueDescriptor().Mapped( result.first.element->value ))
MappedType( std::forward<TArgs>( args)... );
1445 template<
typename TRequires=
MappedType,
typename... TArgs>
1446 requires( std::same_as<TRequires, StoredType>
1449 TArgs&&... >::value )
1452 std::pair<Iterator, bool> result= base::insertOrGet( key, THash{}(key) );
1455 if( result.second ==
false )
1459 new (&result.first.element->value)
StoredType( key, std::forward<TArgs>( args)... );
1499 template<
typename TRequires=
MappedType,
typename... TArgs>
1500 requires ( std::same_as<TRequires, StoredType>
1501 && std::is_move_constructible<StoredType>::value )
1503 StoredType value( std::forward<TArgs>( args)... );
1506 std::pair<Iterator, bool> result= base::insertIfNotExists( TValueDescriptor().Key(value),
1507 THash{}(TValueDescriptor().Key(value)) );
1510 if( result.second ==
false )
1514 new ( &result.first.element->value )
StoredType( std::move(value) );
1544 template<
typename... TArgs>
1547 template<
typename... TArgs>
1548 requires( !std::is_constructible<
StoredType,
const KeyType&, TArgs&&... >::value )
1551 std::pair<Iterator, bool> result= base::insertIfNotExists( key, THash{}(key) );
1554 if( result.second ==
false )
1558 new (&TValueDescriptor().Key(result.first.element->value))
KeyType( key );
1561 new (&TValueDescriptor().Mapped(result.first.element->value))
MappedType( std::forward<TArgs>( args)... );
1566 template<
typename... TArgs>
1567 requires(std::is_constructible<
StoredType,
const KeyType&, TArgs&&...>::value )
1570 std::pair<Iterator, bool> result= base::insertIfNotExists( key, THash{}(key) );
1573 if( result.second ==
false )
1577 new (&result.first.element->value)
StoredType( key, std::forward<TArgs>( args)... );
1602 auto hashCode = THash{}(key);
1603 auto bucketIdx= hashCode % base::bucketCount;
1604 Element* elem = base::findElement( bucketIdx, key, hashCode );
1605 return Iterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1613 auto hashCode = THash{}(key);
1614 auto bucketIdx= hashCode % base::bucketCount;
1615 Element* elem = base::findElement( bucketIdx, key, hashCode );
1616 return ConstIterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1630 auto bucketIdx= hashCode % base::bucketCount;
1631 Element* elem = base::findElement( bucketIdx, key, hashCode );
1632 return Iterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1646 auto bucketIdx= hashCode % base::bucketCount;
1647 Element* elem = base::findElement( bucketIdx, key, hashCode );
1648 return ConstIterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1656 auto hashCode= THash{}(key);
1657 return base::findElement(hashCode % base::bucketCount, key, hashCode )
1669 {DCSSHRD
return base::findRange( key ); }
1679 {DCSSHRD
return base::findRange( key ); }
1712 Node* previous= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1713 if( previous ==
nullptr )
1714 return ElementHandle(
this,
nullptr);
1716 Element* element= previous->next();
1717 previous->removeNext();
1719 return ElementHandle(
this, element );
1740 && pos.table !=
nullptr ,
1741 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1743 Node* previous= base::buckets[pos.bucketIdx].findLastBefore( pos.element );
1745 "Illegal iterator: Element not found." )
1749 return ElementHandle(
this, pos.element );
1769 Node* beforeFirst= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1770 if( beforeFirst ==
nullptr )
1775 while(
end && base::areEqual(
end, key, hashCode ) )
1779 auto result= base::recyclerType::RecycleList(beforeFirst->next(),
end);
1780 beforeFirst->next(
end );
1782 base::size-= result.second;
1783 return result.second;
1813 Node* before= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1814 if( before ==
nullptr )
1818 || !base::areEqual( before->next()->next(), key, hashCode ),
1819 "MONOMEM/HASHTABLE",
"More than one element found matching the given key" )
1821 Element* elem= before->removeNext();
1822 base::recyclerType::Recycle(elem);
1840 && pos.table !=
nullptr ,
1841 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1843 Iterator result(
this, pos.bucketIdx, pos.element );
1847 Node* previous= base::buckets[pos.bucketIdx].findLastBefore( pos.element );
1849 "Illegal iterator: Element not found." )
1853 base::recyclerType::Recycle(toDelete);
1871 && start.table !=
nullptr ,
1872 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1875 "Iterators are referring to different hash tables." )
1877 if( start.element ==
end.element )
1878 return Iterator(
this, start.bucketIdx, start.element );
1881 for(
uinteger bucketIdx= start.bucketIdx; bucketIdx <=
end.bucketIdx; ++bucketIdx ) {
1883 if( bucketIdx == base::bucketCount )
1888 if( bucketIdx == start.bucketIdx ) {
1890 previous= base::buckets[start.bucketIdx].findLastBefore( start.element );
1892 "Illegal iterator: Element not found." )
1895 if( base::buckets[bucketIdx].isEmpty() )
1897 previous= &base::buckets[bucketIdx];
1901 if ( bucketIdx <
end.bucketIdx ) {
1902 base::size-= previous->count();
1903 base::recyclerType::RecycleList( previous->next() );
1904 previous->next(
nullptr );
1906 auto pair= base::recyclerType::RecycleList(previous->next(),
end.element );
1907 previous->next(
end.element );
1908 base::size-= pair.second;
1925 ALIB_ASSERT_ERROR( pos.element !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1929 Element* element= pos.element;
1930 base::buckets[pos.bucketIdx].findAndRemove( element );
1931 base::recyclerType::Recycle( element);
1947 ALIB_ASSERT_ERROR( start.element !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1949 Node* previous= base::buckets[start.bucketIdx].findLastBefore( start.element );
1950 ALIB_ASSERT_ERROR( previous !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1951 if( start.element ==
end.element )
1954 previous->next(
end.element );
1955 auto pair= base::recyclerType::RecycleList( start.element,
end.element );
1957 base::size-= pair.second;
1996 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
1997 return LocalIterator( bucketNumber, base::buckets[bucketNumber].first() );
2006 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2016 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2026 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2036 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2046 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2057#if ALIB_DEBUG_CONTAINERS
2079template<
typename THashtable>
2081std::tuple<double,double,integer,integer>
2084 auto qtyBuckets = hashtable.BucketCount();
2085 double averageExpected = double(hashtable.Size()) / double(qtyBuckets);
2086 uinteger minimum = std::numeric_limits<uinteger>::max();
2087 uinteger maximum = std::numeric_limits<uinteger>::min();
2090 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