COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Private Member Functions | List of all members
covise::coIntHash< DATA > Class Template Reference

#include <coIntHash.h>

Inheritance diagram for covise::coIntHash< DATA >:
Inheritance graph
[legend]
Collaboration diagram for covise::coIntHash< DATA >:
Collaboration graph
[legend]

Public Member Functions

 coIntHash (const DATA &nullelem)
 
 coIntHash ()
 
- Public Member Functions inherited from covise::coHash< int, DATA >
 coHash ()
 Default constructor. More...
 
 coHash (const DATA &nullelem)
 Default constructor with NULL element. More...
 
virtual ~coHash ()
 Destructor. More...
 
int insert (const int &key, const DATA &inData)
 insert an entry More...
 
int remove (const coHashIter< int, DATA > &iter)
 remove an entry More...
 
coHashIter< int, DATA > operator[] (const int &key)
 get element More...
 
coHashIter< int, DATA > first ()
 get first to step through More...
 
void clear ()
 remove all elements More...
 
int getNumEntries () const
 get number of entries currently in hash More...
 
const DATA & find (const int &key) const
 get element (only use with preset NULL element!!!) More...
 
unsigned long getHash (const int &key) const
 get hash index, 0 if no element found More...
 

Private Member Functions

virtual unsigned long hash1 (const int &key) const
 1st Hash function More...
 
virtual unsigned long hash2 (const int &key) const
 2nd Hash function More...
 
virtual bool equal (const int &key1, const int &key2) const
 Equal function. More...
 

Additional Inherited Members

- Protected Types inherited from covise::coMultiHashBase< KEY, DATA >
enum  { EMPTY = 0, PREVIOUS, USED }
 
- Protected Member Functions inherited from covise::coHashBase< KEY, DATA >
 coHashBase (DATA nullelem)
 
 coHashBase ()
 
virtual unsigned long nextHash (unsigned long) const
 no identical keys in table More...
 
virtual int insert (const KEY &key, const DATA &inData)
 insert: if existing element, replace it More...
 
virtual unsigned long hash1 (const KEY &) const =0
 first hash function (pure virtual) More...
 
virtual unsigned long hash2 (const KEY &) const =0
 second hash function (pure virtual) More...
 
virtual bool equal (const KEY &, const KEY &) const =0
 KEY1 == KEY2 operation (pure virtual) More...
 
- Protected Member Functions inherited from covise::coMultiHashBase< KEY, DATA >
 coMultiHashBase ()
 constructor More...
 
 coMultiHashBase (DATA nullelem)
 constructor More...
 
const DATA & getNullElem () const
 get the NULL element More...
 
virtual ~coMultiHashBase ()
 destructor More...
 
int remove (unsigned long hashIndex)
 remove an entry by hashIndex More...
 
void removeAll ()
 remove an entry by hashIndex More...
 
unsigned long getHash (const KEY &key) const
 get hash index, 0 if no element found More...
 
DATA & operator[] (unsigned long hashIndex)
 access element by hash index: assert() correct index !! More...
 
const DATA & operator[] (unsigned long hashIndex) const
 access element by hash index: assert() correct index !! More...
 
int getNumEntries () const
 get number of entries currently in hash More...
 
- Protected Attributes inherited from covise::coMultiHashBase< KEY, DATA >
KEY * keys
 
unsigned char * entryFlags
 
unsigned int size
 size of the list More...
 
unsigned int prime
 the prime currently used as the length of the list More...
 

Constructor & Destructor Documentation

template<class DATA >
covise::coIntHash< DATA >::coIntHash ( const DATA &  nullelem)
inline
template<class DATA >
covise::coIntHash< DATA >::coIntHash ( )
inline

Member Function Documentation

template<class DATA >
virtual bool covise::coIntHash< DATA >::equal ( const int &  key1,
const int &  key2 
) const
inlineprivatevirtual

Equal function.

template<class DATA >
virtual unsigned long covise::coIntHash< DATA >::hash1 ( const int &  key) const
inlineprivatevirtual

1st Hash function

template<class DATA >
virtual unsigned long covise::coIntHash< DATA >::hash2 ( const int &  key) const
inlineprivatevirtual

2nd Hash function


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