431template<
typename TAllocator,
432 typename TValueDescriptor,
433 typename THash = std::hash <typename TValueDescriptor::KeyType>,
434 typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>,
436 Recycling TRecycling = Recycling::Private >
441 #if ALIB_DEBUG_CRITICAL_SECTIONS
443 #define DCS ALIB_DCS_WITH(dcs)
444 #define DCSSHRD ALIB_DCS_SHARED_WITH(dcs)
455 using Element =
typename base::Element;
456 using Node =
typename base::Node;
480 using KeyType =
typename TValueDescriptor::KeyType;
514 static constexpr bool IsRecycling() {
return recyclerType::IsRecycling(); }
520 using Iterator =
typename base::template TIterator < StoredType>;
583 other.element=
nullptr;
628 template<
bool TRequires= TRecycling!= Recycling::Shared>
632 float pBaseLoadFactor = 1.0,
633 float pMaxLoadFactor = 2.0 )
634 :
base( pAllocator, pBaseLoadFactor, pMaxLoadFactor )
650 template<
bool TRequires= TRecycling!= Recycling::Shared>
654 float pMaxLoadFactor = 2.0 )
655 :
base( pBaseLoadFactor, pMaxLoadFactor )
670 template<
typename TSharedRecycler= SharedRecyclerType>
671 requires (!std::same_as<TSharedRecycler, void>)
673 TSharedRecycler& pSharedRecycler,
674 float pBaseLoadFactor = 1.0,
675 float pMaxLoadFactor = 2.0 )
676 :
base( pAllocator, pSharedRecycler, pBaseLoadFactor, pMaxLoadFactor )
689 template<
typename TSharedRecycler= SharedRecyclerType>
690 requires (!std::same_as<TSharedRecycler, void>)
692 float pBaseLoadFactor = 1.0,
693 float pMaxLoadFactor = 2.0 )
694 :
base( pSharedRecycler, pBaseLoadFactor, pMaxLoadFactor )
735 auto& allocator = base::base::GetAllocator();
737 if constexpr ( std::same_as<
typename base::recyclerType,
751 bool IsEmpty() const noexcept {
return base::size == 0; }
761 return base::rehash(
uinteger(std::ceil( expectedSize / base::baseLoadFactor)) );
779 - base::recyclerType::Count();
780 if( requiredRecyclables > 0 )
781 recyclerType::Reserve( requiredRecyclables );
795 {DCSSHRD
return base::recyclerType::Count(); }
821 { base::baseLoadFactor= newBaseLoadFactor; }
852 { base::setMaxLoadFactor( newMaxLoadFactor ); }
878 "Bucket number out of range. {}>={}", bucketNumber, base::bucketCount )
879 return uinteger(base::buckets[bucketNumber].count());
887 {
return THash{}(key) % base::bucketCount; }
897 {
return Insert(value, THash{}(TValueDescriptor().Key(
reinterpret_cast<StoredType&
>(value)))); }
909 {
return Insert(value, hashCode ); }
925 auto hashCode = THash{}( TValueDescriptor().Key(
reinterpret_cast<StoredType&
>(value)) );
926 return Insert( std::move(value), hashCode );
940 Element* element= base::allocElement(hashCode);
943 new ( &element->value )
StoredType ( std::move(value) );
946 base::increaseSize( 1 );
947 auto bucketIdx= base::insertInBucket( element, hashCode );
948 return Iterator(
this, bucketIdx, element);
971 if( handle.IsEmpty() )
974 base::increaseSize( 1 );
975 Element* element= handle.element;
976 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
977 element->fixHashCode( hashCode );
978 auto bucketIdx= base::insertInBucket( element, hashCode );
979 handle.element=
nullptr;
980 return Iterator(
this, bucketIdx, element );
1031 auto hashCode = THash{}( TValueDescriptor().Key(
reinterpret_cast<StoredType&
>(value)) );
1046 Element* element = base::allocElement( hashCode );
1048 base::increaseSize( 1 );
1049 auto bucketIdx= hashCode % base::bucketCount;
1050 base::buckets[bucketIdx].pushFront( element );
1052 new ( &element->value )
StoredType( std::move(value) );
1057 ALIB_ASSERT( it.element == element,
"MONOMEM/HASHTABLE" )
1058 while( ++it !=
cend(bucketIdx) ) {
1060 "InsertUnique used while element with same key-portion existed!" )
1064 return Iterator(
this, bucketIdx, element);
1082 template<
typename TRequires= MappedType>
1083 requires(!std::same_as<TRequires, StoredType>)
1107 template<
typename TRequires= MappedType>
1108 requires(!std::same_as<TRequires, StoredType>)
1110 {
return InsertOrAssign( key, std::move(mapped), THash{}(key) ); }
1132 template<
typename TRequires= MappedType>
1133 requires(!std::same_as<TRequires, StoredType>)
1136 std::pair<Iterator, bool> result= base::insertOrGet( key, hashCode );
1139 if( result.second ==
false )
1140 lang::Destruct( TValueDescriptor().Mapped( result.first.element->value ) );
1144 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1147 new ( &TValueDescriptor().Mapped( result.first.element->value ) )
MappedType( std::move( mapped) );
1167 template<
typename TRequires= MappedType>
1168 requires(!std::same_as<TRequires, StoredType>)
1192 template<
typename TRequires= MappedType>
1193 requires(!std::same_as<TRequires, StoredType>)
1197 std::pair<Iterator, bool> result= base::insertIfNotExists( key, hashCode );
1200 if( result.second ==
false )
1204 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1207 new ( &TValueDescriptor().Mapped( result.first.element->value ) )
MappedType( std::move( mapped) );
1233 template<
typename TRequires= MappedType>
1234 requires(!std::same_as<TRequires, StoredType>)
1263 auto hashCode= THash{}( TValueDescriptor().Key(value) );
1282 std::pair<Iterator, bool> result= base::insertIfNotExists( TValueDescriptor().Key(value), hashCode );
1285 if( result.second ==
false )
1289 new ( &result.first.element->value )
StoredType( std::move(value) );
1320 if( handle.IsEmpty() )
1321 return Iterator(
this, base::bucketCount,
nullptr );
1323 Element* element = handle.element;
1324 auto hashCode = THash{}( TValueDescriptor().Key( handle.element->value ) );
1325 auto bucketIdx= hashCode % base::bucketCount;
1327 Element* existing= base::findElement( hashCode, TValueDescriptor().Key( element->value ), hashCode );
1328 if ( existing !=
nullptr )
1329 return Iterator(
this, bucketIdx, existing );
1331 handle.element=
nullptr;
1332 element->fixHashCode( hashCode );
1334 bucketIdx= base::increaseSize( 1, hashCode );
1335 base::buckets[bucketIdx].pushFront( element );
1336 return Iterator(
this, bucketIdx, element);
1352 template<
typename... TArgs>
1355 Element* element= base::allocElement( 0 );
1358 new ( &element->value )
StoredType( std::forward<TArgs>(args)... );
1361 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
1362 element->fixHashCode( hashCode );
1365 base::increaseSize( 1 );
1366 auto bucketIdx= base::insertInBucket( element, hashCode );
1367 return Iterator(
this, bucketIdx, element);
1395 template<
typename... TArgs>
1398 Element* element= base::allocElement(0);
1401 new ( &element->value )
StoredType( std::forward<TArgs>(args)... );
1404 auto hashCode= THash{}( TValueDescriptor().Key( element->value ));
1405 element->fixHashCode( hashCode );
1409 auto bucketIdx= base::increaseSize( 1, hashCode );
1410 base::buckets[bucketIdx].pushFront( element );
1411 auto result=
Iterator(
this, bucketIdx, element);
1415 auto it=
ConstLocalIterator( result.bucketIdx, base::buckets[result.bucketIdx].first() );
1416 ALIB_ASSERT( it.element == result.element,
"MONOMEM/HASHTABLE" )
1418 ALIB_ASSERT_ERROR( !base::areEqual(result.element, it.element ),
"MONOMEM/HASHTABLE",
1419 "EmplaceUnique used while element with same key-portion existed!" )
1453 template<
typename TRequires=
MappedType,
typename... TArgs>
1454 requires(!std::same_as<TRequires, StoredType>)
1457 template<
typename TRequires=
MappedType,
typename... TArgs>
1458 requires(!std::same_as<TRequires, StoredType>)
1461 std::pair<Iterator, bool> result= base::insertOrGet( key, THash{}(key) );
1464 if( result.second ==
false )
1465 lang::Destruct( TValueDescriptor().Mapped( result.first.element->value ) );
1469 new (&TValueDescriptor().Key( result.first.element->value ))
KeyType( key );
1472 new ( &TValueDescriptor().Mapped( result.first.element->value ))
MappedType( std::forward<TArgs>( args)... );
1478 template<
typename TRequires=
MappedType,
typename... TArgs>
1479 requires( std::same_as<TRequires, StoredType>
1482 TArgs&&... >::value )
1485 std::pair<Iterator, bool> result= base::insertOrGet( key, THash{}(key) );
1488 if( result.second ==
false )
1492 new (&result.first.element->value)
StoredType( key, std::forward<TArgs>( args)... );
1534 template<
typename TRequires=
MappedType,
typename... TArgs>
1535 requires ( std::same_as<TRequires, StoredType>
1536 && std::is_move_constructible<StoredType>::value )
1538 StoredType value( std::forward<TArgs>( args)... );
1541 std::pair<Iterator, bool> result= base::insertIfNotExists( TValueDescriptor().Key(value),
1542 THash{}(TValueDescriptor().Key(value)) );
1545 if( result.second ==
false )
1549 new ( &result.first.element->value )
StoredType( std::move(value) );
1581 template<
typename... TArgs>
1584 template<
typename... TArgs>
1585 requires( !std::is_constructible<
StoredType,
const KeyType&, TArgs&&... >::value )
1588 std::pair<Iterator, bool> result= base::insertIfNotExists( key, THash{}(key) );
1591 if( result.second ==
false )
1595 new (&TValueDescriptor().Key(result.first.element->value))
KeyType( key );
1598 new (&TValueDescriptor().Mapped(result.first.element->value))
MappedType( std::forward<TArgs>( args)... );
1603 template<
typename... TArgs>
1604 requires(std::is_constructible<
StoredType,
const KeyType&, TArgs&&...>::value )
1607 std::pair<Iterator, bool> result= base::insertIfNotExists( key, THash{}(key) );
1610 if( result.second ==
false )
1614 new (&result.first.element->value)
StoredType( key, std::forward<TArgs>( args)... );
1639 auto hashCode = THash{}(key);
1640 auto bucketIdx= hashCode % base::bucketCount;
1641 Element* elem = base::findElement( bucketIdx, key, hashCode );
1642 return Iterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1650 auto hashCode = THash{}(key);
1651 auto bucketIdx= hashCode % base::bucketCount;
1652 Element* elem = base::findElement( bucketIdx, key, hashCode );
1653 return ConstIterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1667 auto bucketIdx= hashCode % base::bucketCount;
1668 Element* elem = base::findElement( bucketIdx, key, hashCode );
1669 return Iterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1683 auto bucketIdx= hashCode % base::bucketCount;
1684 Element* elem = base::findElement( bucketIdx, key, hashCode );
1685 return ConstIterator(
this, elem ==
nullptr ? base::bucketCount : bucketIdx, elem );
1693 auto hashCode= THash{}(key);
1694 return base::findElement(hashCode % base::bucketCount, key, hashCode )
1706 {DCSSHRD
return base::findRange( key ); }
1716 {DCSSHRD
return base::findRange( key ); }
1749 Node* previous= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1750 if( previous ==
nullptr )
1751 return ElementHandle(
this,
nullptr);
1753 Element* element= previous->next();
1754 previous->removeNext();
1756 return ElementHandle(
this, element );
1777 && pos.table !=
nullptr ,
1778 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1780 Node* previous= base::buckets[pos.bucketIdx].findLastBefore( pos.element );
1782 "Illegal iterator: Element not found." )
1786 return ElementHandle(
this, pos.element );
1806 Node* beforeFirst= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1807 if( beforeFirst ==
nullptr )
1812 while(
end && base::areEqual(
end, key, hashCode ) )
1816 auto result= base::recyclerType::RecycleList(beforeFirst->next(),
end);
1817 beforeFirst->next(
end );
1819 base::size-= result.second;
1820 return result.second;
1850 Node* before= base::findElementBefore( hashCode % base::bucketCount, hashCode, key );
1851 if( before ==
nullptr )
1855 || !base::areEqual( before->next()->next(), key, hashCode ),
1856 "MONOMEM/HASHTABLE",
"More than one element found matching the given key" )
1858 Element* elem= before->removeNext();
1859 base::recyclerType::Recycle(elem);
1877 && pos.table !=
nullptr ,
1878 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1880 Iterator result(
this, pos.bucketIdx, pos.element );
1884 Node* previous= base::buckets[pos.bucketIdx].findLastBefore( pos.element );
1886 "Illegal iterator: Element not found." )
1890 base::recyclerType::Recycle(toDelete);
1908 && start.table !=
nullptr ,
1909 "MONOMEM/HASHTABLE",
"Illegal iterator." )
1912 "Iterators are referring to different hash tables." )
1914 if( start.element ==
end.element )
1915 return Iterator(
this, start.bucketIdx, start.element );
1918 for(
uinteger bucketIdx= start.bucketIdx; bucketIdx <=
end.bucketIdx; ++bucketIdx ) {
1920 if( bucketIdx == base::bucketCount )
1925 if( bucketIdx == start.bucketIdx ) {
1927 previous= base::buckets[start.bucketIdx].findLastBefore( start.element );
1929 "Illegal iterator: Element not found." )
1932 if( base::buckets[bucketIdx].isEmpty() )
1934 previous= &base::buckets[bucketIdx];
1938 if ( bucketIdx <
end.bucketIdx ) {
1939 base::size-= previous->count();
1940 base::recyclerType::RecycleList( previous->next() );
1941 previous->next(
nullptr );
1943 auto pair= base::recyclerType::RecycleList(previous->next(),
end.element );
1944 previous->next(
end.element );
1945 base::size-= pair.second;
1962 ALIB_ASSERT_ERROR( pos.element !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1966 Element* element= pos.element;
1967 base::buckets[pos.bucketIdx].findAndRemove( element );
1968 base::recyclerType::Recycle( element);
1984 ALIB_ASSERT_ERROR( start.element !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1986 Node* previous= base::buckets[start.bucketIdx].findLastBefore( start.element );
1987 ALIB_ASSERT_ERROR( previous !=
nullptr,
"MONOMEM/HASHTABLE",
"Illegal iterator." )
1988 if( start.element ==
end.element )
1991 previous->next(
end.element );
1992 auto pair= base::recyclerType::RecycleList( start.element,
end.element );
1994 base::size-= pair.second;
2033 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2034 return LocalIterator( bucketNumber, base::buckets[bucketNumber].first() );
2043 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2053 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2063 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2073 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2083 "Bucket number out of range: {}>={}.", bucketNumber, base::bucketCount )
2094#if ALIB_DEBUG_CONTAINERS
2116template<
typename THashtable>
2118std::tuple<double,double,integer,integer>
2121 auto qtyBuckets = hashtable.BucketCount();
2122 double averageExpected = double(hashtable.Size()) / double(qtyBuckets);
2123 uinteger minimum = std::numeric_limits<uinteger>::max();
2124 uinteger maximum = std::numeric_limits<uinteger>::min();
2127 for(
uinteger i= 0 ; i < qtyBuckets ; ++i )
2129 auto bucketSize= hashtable.BucketSize( i );
2130 sumCheck+= bucketSize;
2131 if( minimum > bucketSize ) minimum= bucketSize;
2132 if( maximum < bucketSize ) maximum= bucketSize;
2134 double diff= averageExpected - double(bucketSize);
2135 diffs+= diff > 0 ? diff : - diff;
2139 "Error: Hashtable::Size() and sum of bucket sizes differ: {}!={}", hashtable.Size(),sumCheck )
2140 double deviation= diffs / double(qtyBuckets);
2142 return std::make_tuple( averageExpected, deviation, minimum, maximum );
2188template<
typename TAllocator,
2190 typename THash = std::hash <T>,
2191 typename TEqual = std::equal_to<T>,
2193 Recycling TRecycling = Recycling::Private >
2234template<
typename TAllocator,
2237 typename THash = std::hash <TKey>,
2238 typename TEqual = std::equal_to<TKey>,
2240 Recycling TRecycling = Recycling::Private >
2250template<
typename TAllocator,
2251 typename TValueDescriptor,
2252 typename THash = std::hash <typename TValueDescriptor::KeyType>,
2253 typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>,
2255 Recycling TRecycling = Recycling::Private >
2259template<
typename TAllocator,
2261 typename THash = std::hash <T>,
2262 typename TEqual = std::equal_to<T>,
2264 Recycling TRecycling = Recycling::Private >
2268template<
typename TAllocator,
2271 typename THash = std::hash <TKey>,
2272 typename TEqual = std::equal_to<TKey>,
2274 Recycling TRecycling = Recycling::Private >
2279#if ALIB_DEBUG_CRITICAL_SECTIONS
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_WARNINGS_IGNORE_NOTHING_RETURNED Iterator erase(ConstIterator start, ConstIterator end)
std::pair< Iterator, bool > InsertIfNotExistent(const KeyType &key, const MappedType &mapped)
float BaseLoadFactor() const noexcept
ConstIterator end() const
Iterator EmplaceUnique(TArgs &&... args)
HashTable(AllocatorType &pAllocator, TSharedRecycler &pSharedRecycler, float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
std::pair< Iterator, bool > InsertIfNotExistent(const StoredType &value)
std::pair< Iterator, bool > EmplaceIfNotExistent(TArgs &&... args)
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
void ReserveRecyclables(integer qty, lang::ValueReference reference)
static constexpr bool IsRecycling()
typename TValueDescriptor::MappedType MappedType
AllocatorType & GetAllocator() noexcept
typename base::recyclerType recyclerType
The recycler type.
Iterator Find(const KeyType &key, size_t hashCode)
Iterator Insert(ElementHandle &handle)
uinteger BucketSize(uinteger bucketNumber) const noexcept
HashTable(AllocatorType &pAllocator, float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
ALIB_WARNINGS_RESTORE LocalIterator erase(ConstLocalIterator pos)
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.
std::pair< Iterator, bool > InsertIfNotExistent(const KeyType &key, MappedType &&mapped)
uinteger BucketNumber(const KeyType &key) const noexcept
ConstLocalIterator cend(uinteger bucketNumber) const
typename TValueDescriptor::StoredType StoredType
TValueDescriptor DescriptorType
Type definition publishing template parameter TValueDescriptor.
std::pair< Iterator, bool > InsertOrAssign(const KeyType &key, const MappedType &mapped)
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)
std::pair< Iterator, bool > InsertIfNotExistent(const KeyType &key, MappedType &&mapped, size_t hashCode)
std::pair< Iterator, bool > InsertOrAssign(const KeyType &key, MappedType &&mapped, size_t hashCode)
ConstIterator begin() const
std::pair< Iterator, Iterator > EqualRange(const KeyType &key)
ConstIterator Find(const KeyType &key) const
std::pair< Iterator, bool > EmplaceOrAssign(const KeyType &key, TArgs &&... args)
typename base::SharedRecyclerType SharedRecyclerType
ElementHandle Extract(const KeyType &key, size_t hashCode)
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
std::pair< Iterator, bool > InsertOrAssign(const KeyType &key, MappedType &&mapped)
ConstLocalIterator end(uinteger bucketNumber) const
LocalIterator erase(ConstLocalIterator start, ConstLocalIterator end)
THash HashType
Type definition publishing template parameter THash.
ConstIterator Find(const KeyType &key, size_t hashCode) const
typename TValueDescriptor::KeyType KeyType
LocalIterator begin(uinteger bucketNumber)
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)
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
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
void Reserve(integer qty, lang::ValueReference reference)
bool EraseUnique(const KeyType &key)
HashTable(TSharedRecycler &pSharedRecycler, float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
static constexpr Recycling RecyclingTag()
HashTable(float pBaseLoadFactor=1.0, float pMaxLoadFactor=2.0)
#define ALIB_ASSERT(cond, domain)
#define ALIB_WARNINGS_RESTORE
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_WARNINGS_IGNORE_NOTHING_RETURNED
#define ALIB_DEBUG_CRITICAL_SECTIONS
std::tuple< double, double, integer, integer > DbgGetHashTableDistribution(const THashtable &hashtable)
HashTable< TAllocator, TPairDescriptor< TKey, TMapped >, THash, TEqual, THashCaching, TRecycling > HashMap
HashTable< TAllocator, TIdentDescriptor< T >, THash, TEqual, THashCaching, TRecycling > HashSet
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.
float maxLoadFactor
The maximum quotient of size and bucketCount that triggers a rehash.
lang::SidiNodeBase< Element > Node
Type of a node in the List.
typename HTElementSelector< TValueDescriptor, THashCaching >::Type Element
The type stored in the bucket of class HashTable.
typename RecyclingSelector< TRecycling >::template Type< TAllocator, typename HTElementSelector< TValueDescriptor, THashCaching >::Type > base
Our base type.
float baseLoadFactor
The load factor that is set when the table is rehashed automatically.
TElement * removeNext() noexcept