provides options for Hashtable More...
#include <name-tree-hashtable.hpp>
Public Member Functions | |
HashtableOptions (size_t size=16) | |
constructor More... | |
Public Attributes | |
size_t | initialSize |
initial number of buckets More... | |
size_t | minSize |
minimal number of buckets More... | |
float | expandLoadFactor = 0.5 |
if hashtable has more than nBuckets*expandLoadFactor nodes, it will be expanded More... | |
float | expandFactor = 2.0 |
when hashtable is expanded, its new size is nBuckets*expandFactor More... | |
float | shrinkLoadFactor = 0.1 |
if hashtable has less than nBuckets*shrinkLoadFactor nodes, it will be shrunk More... | |
float | shrinkFactor = 0.5 |
when hashtable is shrunk, its new size is max(nBuckets*shrinkFactor, minSize) More... | |
provides options for Hashtable
Definition at line 106 of file name-tree-hashtable.hpp.
|
explicit |
constructor
Definition at line 112 of file name-tree-hashtable.cpp.
size_t nfd::name_tree::HashtableOptions::initialSize |
initial number of buckets
Definition at line 119 of file name-tree-hashtable.hpp.
Referenced by nfd::name_tree::Hashtable::Hashtable().
size_t nfd::name_tree::HashtableOptions::minSize |
minimal number of buckets
Definition at line 123 of file name-tree-hashtable.hpp.
Referenced by nfd::name_tree::Hashtable::erase(), and nfd::name_tree::Hashtable::Hashtable().
float nfd::name_tree::HashtableOptions::expandLoadFactor = 0.5 |
if hashtable has more than nBuckets*expandLoadFactor nodes, it will be expanded
Definition at line 127 of file name-tree-hashtable.hpp.
Referenced by nfd::name_tree::Hashtable::Hashtable().
float nfd::name_tree::HashtableOptions::expandFactor = 2.0 |
when hashtable is expanded, its new size is nBuckets*expandFactor
Definition at line 131 of file name-tree-hashtable.hpp.
Referenced by nfd::name_tree::Hashtable::Hashtable().
float nfd::name_tree::HashtableOptions::shrinkLoadFactor = 0.1 |
if hashtable has less than nBuckets*shrinkLoadFactor nodes, it will be shrunk
Definition at line 135 of file name-tree-hashtable.hpp.
Referenced by nfd::name_tree::Hashtable::Hashtable().
float nfd::name_tree::HashtableOptions::shrinkFactor = 0.5 |
when hashtable is shrunk, its new size is max(nBuckets*shrinkFactor, minSize)
Definition at line 139 of file name-tree-hashtable.hpp.
Referenced by nfd::name_tree::Hashtable::erase(), and nfd::name_tree::Hashtable::Hashtable().