10 #ifndef TPETRA_HASHTABLE_DECL_HPP
11 #define TPETRA_HASHTABLE_DECL_HPP
13 #include <Teuchos_Describable.hpp>
14 #include "Tpetra_ConfigDefs.hpp"
31 template<
typename KeyType,
typename ValueType>
39 Node (
const KeyType key = 0,
const ValueType value = 0, Node * ptr = NULL)
40 : Key(key), Value(value), Ptr(ptr) {}
43 Node (
const Node& src) : Key(src.Key), Value(src.Value), Ptr(src.Ptr) {}
45 Node& operator= (
const Node& src) {
57 #ifdef HAVE_TPETRA_DEBUG
60 #endif // HAVE_TPETRA_DEBUG
64 int hashFunc(
const KeyType key );
66 int getRecommendedSize(
const int size );
75 HashTable (
const int size,
const unsigned int seed = (2654435761U));
81 void add (
const KeyType key,
const ValueType value);
84 ValueType
get (
const KeyType key);
93 describe (Teuchos::FancyOStream &out,
94 const Teuchos::EVerbosityLevel verbLevel=
95 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.