Public Member Functions

IntDoubleMap Class Reference

Lightweight hash set class for storing ints Simple hash table with quadratic probing. More...

#include <IntDoubleMap.h>

List of all members.

Public Member Functions

 IntDoubleMap (int capacity)
int  getSize ()
void  insert (int x, double y)
bool  find (int x, double *y)
double  getHits ()
double  getMisses ()

Detailed Description

Lightweight hash set class for storing ints Simple hash table with quadratic probing.


Constructor & Destructor Documentation

IntDoubleMap::IntDoubleMap ( int   capacity  )
Parameters:
[in]capacityInitial maximum size of hash set

Member Function Documentation

bool IntDoubleMap::find ( int   x,
double *   y  
)

returns value of key x in table

Returns:
value of key, -1 if not in array
double IntDoubleMap::getHits (  )
Returns:
total number of calls to find that hit
double IntDoubleMap::getMisses (  )
Returns:
total number of calls to find that missed
int IntDoubleMap::getSize (  )

returns the number of elements stored in hash table

Returns:
the number of elements stored in hash table
void IntDoubleMap::insert ( int   x,
double   y  
)

inserts x into hash table, returns whether x was inserted deletes least recently used element

Parameters:
[in]xkey to put into map
[in]yvalue to insert into map

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Defines