44 #ifndef TPETRA_DETAILS_FIXEDHASHTABLE_DECL_HPP
45 #define TPETRA_DETAILS_FIXEDHASHTABLE_DECL_HPP
47 #include <Teuchos_Describable.hpp>
48 #include <Tpetra_ConfigDefs.hpp>
49 #include <Teuchos_ArrayRCP.hpp>
78 template<
typename KeyType,
typename ValueType>
96 const ValueType startingValue);
104 const ArrayView<const ValueType>& vals);
110 ValueType
get (
const KeyType key)
const;
119 describe (Teuchos::FancyOStream &out,
120 const Teuchos::EVerbosityLevel verbLevel=
121 Teuchos::Describable::verbLevel_default)
const;
125 typedef Array<int>::size_type size_type;
133 ArrayRCP<const size_type> ptr_;
135 ArrayRCP<const std::pair<KeyType, ValueType> > val_;
139 const size_type* rawPtr_;
143 const std::pair<KeyType, ValueType>* rawVal_;
150 init (
const ArrayView<const KeyType>& keys,
151 const ValueType startingValue);
159 init (
const ArrayView<const KeyType>& keys,
160 const ArrayView<const ValueType>& vals);
163 int hashFunc (
const KeyType key)
const;
165 int getRecommendedSize (
const int size);
172 #endif // TPETRA_DETAILS_FIXEDHASHTABLE_DECL_HPP
std::string description() const
Implementation of Teuchos::Describable.
FixedHashTable(const ArrayView< const KeyType > &keys)
Constructor for arbitrary keys and contiguous values starting with zero.
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.