FastPointerHashTable< T > Class Template Reference
A HashTable for pointers only. <hash table="" with="" no="" collision="" handling="">. More...
#include <FastPointerHashTable.hpp>
Public Member Functions | |
FastPointerHashTable (unsigned int siz) | |
void | put (T &elem, unsigned int key) |
Insert an element which must be NOT EQUAL to NULL. | |
T & | get (unsigned int key) |
returns a reference to the element stored in the Table. | |
void | freeElement (const unsigned int key) |
void | freeAllElements () |
void | unlinkElement (const unsigned int key) |
Detailed Description
template<class T>
class FastPointerHashTable< T >
A HashTable for pointers only. <hash table="" with="" no="" collision="" handling="">.
Hashing is done with a simple MODULO operation. If a collision occurs, the element previously stored at that position is DELETED and the new element is inserted.
- Author:
- Peter Schojer
- Version:
- Id
- FastPointerHashTable.hpp,v 1.6 2006/01/20 15:37:17 mkropfbe Exp
Definition at line 60 of file FastPointerHashTable.hpp.
Member Function Documentation
|
returns a reference to the element stored in the Table. Manipulating this reference, will thus also update the element in the Table. If you delete the element outside, you MUST call unlinkElement prior.Definition at line 105 of file FastPointerHashTable.hpp.
|
|
Insert an element which must be NOT EQUAL to NULL. NULL elements will be ignored. If a collission is detected no overflow handling happens. The old element is deleted and the new one inserted. Definition at line 88 of file FastPointerHashTable.hpp.
|
The documentation for this class was generated from the following file: