16 static const int numPrimes =
sizeof(
unsigned long) != 8 ? 256 : 256 + 48;
17 static const unsigned long primes[256 + 48 + 1];
24 RehashPolicy(
float maxLoadFactor = 0.95f,
float growthFactor = 2.f)
28 std::pair<bool, std::size_t>
needRehash(std::size_t numBuckets, std::size_t numElements)
const;
carl is the main namespace for the library.
Mimics stdlibs default rehash policy for hashtables.
std::pair< bool, std::size_t > needRehash(std::size_t numBuckets, std::size_t numElements) const
static const unsigned long primes[256+48+1]
RehashPolicy(float maxLoadFactor=0.95f, float growthFactor=2.f)
static const int numPrimes
std::size_t numBucketsFor(std::size_t numElements) const