Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::DenseSet< T, auto_resize > Class Template Reference

Detailed Description

template<typename T, bool auto_resize = true>
class operations_research::DenseSet< T, auto_resize >

Definition at line 39 of file dense_set.h.

#include <dense_set.h>

Public Types

using iterator = typename std::vector<T>::const_iterator
using const_iterator = typename std::vector<T>::const_iterator
using value_type = T

Public Member Functions

const_iterator begin () const
const_iterator end () const
size_t size () const
bool empty () const
void reserve (size_t size)
size_t capacity () const
std::pair< iterator, bool > insert (T value)
iterator find (T value)
bool contains (T value) const
void erase (iterator it)
int erase (T value)
absl::Span< const T > values () const
void clear ()

Static Public Attributes

static constexpr bool kAutoResize = auto_resize

Member Typedef Documentation

◆ const_iterator

template<typename T, bool auto_resize = true>
using operations_research::DenseSet< T, auto_resize >::const_iterator = typename std::vector<T>::const_iterator

Definition at line 42 of file dense_set.h.

◆ iterator

template<typename T, bool auto_resize = true>
using operations_research::DenseSet< T, auto_resize >::iterator = typename std::vector<T>::const_iterator

Definition at line 41 of file dense_set.h.

◆ value_type

template<typename T, bool auto_resize = true>
using operations_research::DenseSet< T, auto_resize >::value_type = T

Definition at line 43 of file dense_set.h.

Member Function Documentation

◆ begin()

template<typename T, bool auto_resize = true>
const_iterator operations_research::DenseSet< T, auto_resize >::begin ( ) const
inline

Definition at line 46 of file dense_set.h.

◆ capacity()

template<typename T, bool auto_resize = true>
size_t operations_research::DenseSet< T, auto_resize >::capacity ( ) const
inline

Definition at line 54 of file dense_set.h.

◆ clear()

template<typename T, bool auto_resize = true>
void operations_research::DenseSet< T, auto_resize >::clear ( )
inline

Definition at line 104 of file dense_set.h.

◆ contains()

template<typename T, bool auto_resize = true>
bool operations_research::DenseSet< T, auto_resize >::contains ( T value) const
inline

Definition at line 74 of file dense_set.h.

◆ empty()

template<typename T, bool auto_resize = true>
bool operations_research::DenseSet< T, auto_resize >::empty ( ) const
inline

Definition at line 49 of file dense_set.h.

◆ end()

template<typename T, bool auto_resize = true>
const_iterator operations_research::DenseSet< T, auto_resize >::end ( ) const
inline

Definition at line 47 of file dense_set.h.

◆ erase() [1/2]

template<typename T, bool auto_resize = true>
void operations_research::DenseSet< T, auto_resize >::erase ( iterator it)
inline

Definition at line 79 of file dense_set.h.

◆ erase() [2/2]

template<typename T, bool auto_resize = true>
int operations_research::DenseSet< T, auto_resize >::erase ( T value)
inline

Definition at line 89 of file dense_set.h.

◆ find()

template<typename T, bool auto_resize = true>
iterator operations_research::DenseSet< T, auto_resize >::find ( T value)
inline

Definition at line 67 of file dense_set.h.

◆ insert()

template<typename T, bool auto_resize = true>
std::pair< iterator, bool > operations_research::DenseSet< T, auto_resize >::insert ( T value)
inline

Definition at line 56 of file dense_set.h.

◆ reserve()

template<typename T, bool auto_resize = true>
void operations_research::DenseSet< T, auto_resize >::reserve ( size_t size)
inline

Definition at line 50 of file dense_set.h.

◆ size()

template<typename T, bool auto_resize = true>
size_t operations_research::DenseSet< T, auto_resize >::size ( ) const
inline

Definition at line 48 of file dense_set.h.

◆ values()

template<typename T, bool auto_resize = true>
absl::Span< const T > operations_research::DenseSet< T, auto_resize >::values ( ) const
inline

Definition at line 102 of file dense_set.h.

Member Data Documentation

◆ kAutoResize

template<typename T, bool auto_resize = true>
bool operations_research::DenseSet< T, auto_resize >::kAutoResize = auto_resize
staticconstexpr

Definition at line 44 of file dense_set.h.


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