44 #ifndef Epetra_HashTable_H_
45 #define Epetra_HashTable_H_
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
49 #warning "The Epetra package is deprecated"
57 template<
typename value_type>
66 Node(
const long long key = 0,
const value_type value = 0,
Node * ptr = 0 )
81 int Func(
const long long key ) {
82 int intkey = (int) ((key & 0x000000007fffffffLL) + ((key & 0x7fffffff80000000LL) >> 31));
97 for(
int i = 0; i < size; ++i )
Container_[i] = 0;
107 for(
int i = 0; i <
Size_; ++i )
110 while( ptr ) {
Add( ptr->Key, ptr->Value ); ptr = ptr->Ptr; }
118 for(
int i = 0; i <
Size_; ++i )
121 while( ptr1 ) { ptr2 = ptr1; ptr1 = ptr1->
Ptr;
delete ptr2; }
127 void Add(
const long long key,
const value_type value )
134 value_type
Get(
const long long key )
137 while( n && (n->Key != key) ) n = n->
Ptr;
138 if( n )
return n->
Value;
147 bool throw_error =
true;
149 throw ReportError(
"Epetra_HashTable::operator= not supported.",-1);
value_type Get(const long long key)
Node(const long long key=0, const value_type value=0, Node *ptr=0)
Epetra_HashTable(const Epetra_HashTable &obj)
std::string toString(const int &x) const
Epetra_Object: The base Epetra class.
Epetra_HashTable & operator=(const Epetra_HashTable &src)
Node & operator=(const Node &src)
int Func(const long long key)
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
void Add(const long long key, const value_type value)