Public Member Functions

VDRIVE::ImprovedMap Class Reference

#include <ImprovedMap.h>

List of all members.

Public Member Functions

 ImprovedMap (uint64_t initSlices, std::set< uint64_t > *initKeys)
 ImprovedMap (const ImprovedMap &orig)
virtual ~ImprovedMap ()
uint64_t findClosest (uint64_t key)

Detailed Description

ImprovedMap can be used to calculate fast the closest next smaller Value from a set of value to an average Value. if there is no smaller Value it delivers biggest Value. Therefore it cn be used to find next Values on a Ring in O(1).

Constructor & Destructor Documentation

ImprovedMap::ImprovedMap ( uint64_t  initSlices,
std::set< uint64_t > *  initKeys 

Initiate a new Map with the given number of Elements and the given keys.

initSlicesnumber of slices to use (should be O(keys) in most cases
initKeysKeys to be stored in this Map
ImprovedMap::ImprovedMap ( const ImprovedMap orig )

copy constructur

origthe ImprovedMap to be copied.
ImprovedMap::~ImprovedMap (  ) [virtual]


Member Function Documentation

uint64_t ImprovedMap::findClosest ( uint64_t  key )

find the closest Element to the given value.

keyElement to be placed

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