IBucketSet.calcNumBucketsExp2

Calculates the lowest exponent of 2 so that a power of 2 with this exponent is at least n / load_factor.

class IBucketSet
static
uint
calcNumBucketsExp2
(
size_t n
,
float load_factor = 0.75
)

Parameters

n size_t

number of expected elements in the set

load_factor float

desired maximum load factor

Return Value

Type: uint

exponent of 2.

In: load_factor must be greater than 0.

Meta