NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::name_tree::HashtableOptions Class Reference

provides options for Hashtable More...

#include <name-tree-hashtable.hpp>

Collaboration diagram for nfd::name_tree::HashtableOptions:

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...
 

Detailed Description

provides options for Hashtable

Definition at line 106 of file name-tree-hashtable.hpp.

Constructor & Destructor Documentation

◆ HashtableOptions()

nfd::name_tree::HashtableOptions::HashtableOptions ( size_t  size = 16)
explicit

constructor

Postcondition
initialSize == size
minSize == size

Definition at line 112 of file name-tree-hashtable.cpp.

Member Data Documentation

◆ initialSize

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().

◆ minSize

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().

◆ expandLoadFactor

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().

◆ expandFactor

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().

◆ shrinkLoadFactor

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().

◆ shrinkFactor

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().


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