libcuckoo  0.3.1
Public Member Functions | List of all members
libcuckoo::load_factor_too_low Class Reference

#include <cuckoohash_util.hh>

Inheritance diagram for libcuckoo::load_factor_too_low:
Inheritance graph
[legend]
Collaboration diagram for libcuckoo::load_factor_too_low:
Collaboration graph
[legend]

Public Member Functions

 load_factor_too_low (const double lf) noexcept
 
virtual const char * what () const noexcept override
 
double load_factor () const noexcept
 

Detailed Description

Thrown when an automatic expansion is triggered, but the load factor of the table is below a minimum threshold, which can be set by the cuckoohash_map::minimum_load_factor method. This can happen if the hash function does not properly distribute keys, or for certain adversarial workloads.

Constructor & Destructor Documentation

◆ load_factor_too_low()

libcuckoo::load_factor_too_low::load_factor_too_low ( const double  lf)
inlinenoexcept

Constructor

Parameters
lfthe load factor of the table when the exception was thrown

Member Function Documentation

◆ load_factor()

double libcuckoo::load_factor_too_low::load_factor ( ) const
inlinenoexcept
Returns
the load factor of the table when the exception was thrown

◆ what()

virtual const char* libcuckoo::load_factor_too_low::what ( ) const
inlineoverridevirtualnoexcept
Returns
a descriptive error message

The documentation for this class was generated from the following file: