Create a double‐hash table with the specified capacity hint.

Synopsis

Declared in <bdlc_hashtable.h>

explicit
HashTable(
    bsls::Types::Int64 capacityHint,
    bslma::Allocator* basicAllocator = 0);

Description

Create a double‐hash table using the specified capacityHint. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless 0 != capacityHint. Note that capacityHint can be either a positive integer or a negative integer. If capacityHint is positive, then the capacity of the hash table will be the first available prime number larger than, or equal to, capacityHint. Otherwise, the capacity of the hash table will be the first available prime number smaller than, or equal to, capacityHint. Also note that HASH1 will be used as the first hash function, and HASH2 will be used as the second hash function.

Parameters

Name

Description

capacityHint

hint used to select the prime bucket capacity

basicAllocator

allocator used to supply memory

Created with MrDocs