44#ifndef Epetra_HashTable_H_
45#define Epetra_HashTable_H_
49template<
typename value_type>
58 Node(
const long long key = 0,
const value_type value = 0,
Node * ptr = 0 )
73 int Func(
const long long key ) {
74 int intkey = (int) ((key & 0x000000007fffffffLL) + ((key & 0x7fffffff80000000LL) >> 31));
89 for(
int i = 0; i < size; ++i )
Container_[i] = 0;
99 for(
int i = 0; i <
Size_; ++i )
110 for(
int i = 0; i <
Size_; ++i )
113 while( ptr1 ) { ptr2 = ptr1; ptr1 = ptr1->
Ptr;
delete ptr2; }
119 void Add(
const long long key,
const value_type value )
126 value_type
Get(
const long long key )
129 while( n && (n->
Key != key) ) n = n->
Ptr;
130 if( n )
return n->
Value;
139 bool throw_error =
true;
141 throw ReportError(
"Epetra_HashTable::operator= not supported.",-1);
void Add(const long long key, const value_type value)
Epetra_HashTable(const int size, const unsigned int seed=(2654435761U))
Epetra_HashTable & operator=(const Epetra_HashTable &src)
Epetra_HashTable(const Epetra_HashTable &obj)
int Func(const long long key)
value_type Get(const long long key)
Epetra_Object: The base Epetra class.
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
std::string toString(const int &x) const
Node & operator=(const Node &src)
Node(const long long key=0, const value_type value=0, Node *ptr=0)