Mimics stdlibs default rehash policy for hashtables.
More...
#include <PoolHelper.h>
|
| RehashPolicy (float maxLoadFactor=0.95f, float growthFactor=2.f) |
|
std::size_t | numBucketsFor (std::size_t numElements) const |
|
std::pair< bool, std::size_t > | needRehash (std::size_t numBuckets, std::size_t numElements) const |
|
|
static const int | numPrimes = sizeof(unsigned long) != 8 ? 256 : 256 + 48 |
|
static const unsigned long | primes [256+48+1] |
|
◆ RehashPolicy()
carl::pool::RehashPolicy::RehashPolicy |
( |
float |
maxLoadFactor = 0.95f , |
|
|
float |
growthFactor = 2.f |
|
) |
| |
|
inline |
◆ needRehash()
std::pair< bool, std::size_t > carl::pool::RehashPolicy::needRehash |
( |
std::size_t |
numBuckets, |
|
|
std::size_t |
numElements |
|
) |
| const |
◆ numBucketsFor()
std::size_t carl::pool::RehashPolicy::numBucketsFor |
( |
std::size_t |
numElements | ) |
const |
◆ mGrowthFactor
float carl::pool::RehashPolicy::mGrowthFactor |
|
private |
◆ mMaxLoadFactor
float carl::pool::RehashPolicy::mMaxLoadFactor |
|
private |
◆ mNextResize
std::size_t carl::pool::RehashPolicy::mNextResize |
|
mutableprivate |
◆ numPrimes
const int carl::pool::RehashPolicy::numPrimes = sizeof(unsigned long) != 8 ? 256 : 256 + 48 |
|
staticprivate |
◆ primes
const unsigned long carl::pool::RehashPolicy::primes |
|
staticprivate |
The documentation for this class was generated from the following files: