44 #ifndef TPETRA_HASHTABLE_DECL_HPP
45 #define TPETRA_HASHTABLE_DECL_HPP
47 #include <Teuchos_Describable.hpp>
48 #include "Tpetra_ConfigDefs.hpp"
65 template<
typename KeyType,
typename ValueType>
73 Node (
const KeyType key = 0,
const ValueType value = 0, Node * ptr = NULL)
74 : Key(key), Value(value), Ptr(ptr) {}
77 Node (
const Node& src) : Key(src.Key), Value(src.Value), Ptr(src.Ptr) {}
79 Node& operator= (
const Node& src) {
91 #ifdef HAVE_TEUCHOS_DEBUG
94 #endif // HAVE_TEUCHOS_DEBUG
98 int hashFunc(
const KeyType key );
100 int getRecommendedSize(
const int size );
109 HashTable (
const int size,
const unsigned int seed = (2654435761U));
115 void add (
const KeyType key,
const ValueType value);
118 ValueType
get (
const KeyType key);
127 describe (Teuchos::FancyOStream &out,
128 const Teuchos::EVerbosityLevel verbLevel=
129 Teuchos::Describable::verbLevel_default)
const;
HashTable(const int size, const unsigned int seed=(2654435761U))
void add(const KeyType key, const ValueType value)
Add a key and its value to the hash table.
std::string description() const
Implementation of Teuchos::Describable.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print this object with the given verbosity to the output stream.