cds
2.3.2
|
Rational load factor resizing policy. More...
#include <cds/intrusive/striped_set/resizing_policy.h>
Public Member Functions | |
rational_load_factor_resizing () | |
Default ctor, load factor is 1/2. | |
rational_load_factor_resizing (size_t nNumerator, size_t nDenominator) | |
Ctor with explicitly defined nLoadFactor . | |
rational_load_factor_resizing (rational_load_factor_resizing const &src) | |
Copy ctor. | |
rational_load_factor_resizing (rational_load_factor_resizing &&src) | |
Move ctor. | |
template<typename Container , typename Bucket > | |
bool | operator() (size_t nSize, Container const &container, Bucket const &) |
Main policy operator returns true when resizing is needed. More... | |
void | reset () |
Resets internal state of the policy (does nothing) | |
Rational load factor resizing policy.
When total item count in a container exceeds container.bucket_count() * Numerator / Denominator
then resizing is needed.
This policy is stateful: Numerator
and Denominator
specifies in construction time.
|
inline |
Main policy operator returns true
when resizing is needed.
nSize | Current item count of container |
container | Container |