Loading...
Searching...
No Matches
dolfin::Set< T > Class Template Reference

`#include <Set.h>`

## Public Types

typedef std::vector< T >::iterator | iterator
| Iterator.
typedef std::vector< T >::const_iterator | const_iterator
| Const iterator.

## Public Member Functions

| Set ()
| Create empty set.
| Set (std::vector< T > &x)
| Wrap std::vector as a set. Contents will be erased.
| Set (const dolfin::Set< T > &x)
| Copy constructor.
| ~Set ()
| Destructor.
iterator | find (const T &x)
| Find entry in set and return an iterator to the entry.
const_iterator | find (const T &x) const
| Find entry in set and return an iterator to the entry (const).
bool | insert (const T &x)
| Insert entry.
template<typename InputIt>
void | insert (const InputIt first, const InputIt last)
| Insert entries.
const_iterator | begin () const
| Iterator to start of Set.
const_iterator | end () const
| Iterator to beyond end of Set.
std::size_t | size () const
| Set size.
void | erase (const T &x)
| Erase an entry.
void | sort ()
| Sort set.
void | clear ()
| Clear set.
T | operator[] (std::size_t n) const
| Index the nth entry in the set.
const std::vector< T > & | set () const
| Return the vector that stores the data in the Set.
std::vector< T > & | set ()
| Return the vector that stores the data in the Set.

## Detailed Description

template<typename T>
class dolfin::Set< T >

This is a set-like data structure. It is not ordered and it is based a std::vector. It uses linear search, and can be faster than std::set

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

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/common/Set.h