Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | Related Symbols | List of all members
Teuchos::HashSet< Key > Class Template Reference

Templated hashtable-based set. More...

#include <Teuchos_HashSet.hpp>

Public Member Functions

 HashSet (int capacity=19)
 Create an empty HashSet.
 
bool containsKey (const Key &key) const
 Check for the presence of a key.
 
void put (const Key &key)
 Put a new object into the table.
 
void remove (const Key &key)
 Remove from the table the element given by key.
 
int size () const
 Get the number of elements in the table.
 
Array< Keyarrayify () const
 Get list of keys in Array form.
 
void arrayify (Array< Key > &keys) const
 Get list of keys in Array form.
 
std::string toString () const
 Write to a std::string.
 

Related Symbols

(Note that these are not member symbols.)

template<class Key >
std::ostream & operator<< (std::ostream &os, const HashSet< Key > &h)
 Write HashSet to a stream.
 

Detailed Description

template<class Key>
class Teuchos::HashSet< Key >

Templated hashtable-based set.

HashSet is a hashtable-based set, similar to the STL set class or the Java HashSet class.

Definition at line 64 of file Teuchos_HashSet.hpp.

Constructor & Destructor Documentation

◆ HashSet()

template<class Key >
Teuchos::HashSet< Key >::HashSet ( int capacity = 19)
inline

Create an empty HashSet.

Definition at line 116 of file Teuchos_HashSet.hpp.

Member Function Documentation

◆ containsKey()

template<class Key >
bool Teuchos::HashSet< Key >::containsKey ( const Key & key) const
inline

Check for the presence of a key.

Definition at line 123 of file Teuchos_HashSet.hpp.

◆ put()

template<class Key >
void Teuchos::HashSet< Key >::put ( const Key & key)
inline

Put a new object into the table.

Definition at line 140 of file Teuchos_HashSet.hpp.

◆ remove()

template<class Key >
void Teuchos::HashSet< Key >::remove ( const Key & key)
inline

Remove from the table the element given by key.

Definition at line 242 of file Teuchos_HashSet.hpp.

◆ size()

template<class Key >
int Teuchos::HashSet< Key >::size ( ) const
inline

Get the number of elements in the table.

Definition at line 81 of file Teuchos_HashSet.hpp.

◆ arrayify() [1/2]

template<class Key >
Array< Key > Teuchos::HashSet< Key >::arrayify ( ) const
inline

Get list of keys in Array form.

Definition at line 190 of file Teuchos_HashSet.hpp.

◆ arrayify() [2/2]

template<class Key >
void Teuchos::HashSet< Key >::arrayify ( Array< Key > & keys) const
inline

Get list of keys in Array form.

Definition at line 207 of file Teuchos_HashSet.hpp.

◆ toString()

template<class Key >
std::string Teuchos::HashSet< Key >::toString ( ) const
inline

Write to a std::string.

Definition at line 221 of file Teuchos_HashSet.hpp.

Friends And Related Symbol Documentation

◆ operator<<()

template<class Key >
std::ostream & operator<< ( std::ostream & os,
const HashSet< Key > & h )
related

Write HashSet to a stream.

Definition at line 268 of file Teuchos_HashSet.hpp.


The documentation for this class was generated from the following file: