OR-Tools  9.6
IdSet< K >

Detailed Description

template<typename K>
class operations_research::math_opt::IdSet< K >

Definition at line 51 of file id_set.h.

Classes

class  const_iterator
 

Public Types

using IdType = typename K::IdType
 
using StorageType = absl::flat_hash_set< IdType >
 
using key_type = K
 
using value_type = key_type
 
using size_type = typename StorageType::size_type
 
using difference_type = typename StorageType::difference_type
 
using reference = K
 
using const_reference = const K
 
using pointer = void
 
using const_pointer = void
 
using iterator = const_iterator
 

Public Member Functions

 IdSet ()=default
 
template<typename InputIt >
 IdSet (InputIt first, InputIt last)
 
 IdSet (std::initializer_list< value_type > ilist)
 
 IdSet (const ModelStorage *storage, StorageType values)
 
const_iterator cbegin () const
 
const_iterator begin () const
 
const_iterator cend () const
 
const_iterator end () const
 
bool empty () const
 
size_type size () const
 
void clear ()
 
void reserve (size_type count)
 
std::pair< const_iterator, bool > insert (const K &k)
 
template<typename InputIt >
void insert (InputIt first, InputIt last)
 
void insert (std::initializer_list< value_type > ilist)
 
std::pair< const_iterator, bool > emplace (const K &k)
 
size_type erase (const K &k)
 
void erase (const_iterator pos)
 
const_iterator erase (const_iterator first, const_iterator last)
 
void swap (IdSet &other)
 
size_type count (const K &k) const
 
bool contains (const K &k) const
 
const_iterator find (const K &k) const
 
std::pair< const_iterator, const_iteratorequal_range (const K &k) const
 
const StorageTyperaw_set () const
 
const ModelStoragestorage () const
 

Member Typedef Documentation

◆ const_pointer

using const_pointer = void

Definition at line 62 of file id_set.h.

◆ const_reference

using const_reference = const K

Definition at line 60 of file id_set.h.

◆ difference_type

using difference_type = typename StorageType::difference_type

Definition at line 58 of file id_set.h.

◆ IdType

using IdType = typename K::IdType

Definition at line 53 of file id_set.h.

◆ iterator

Definition at line 102 of file id_set.h.

◆ key_type

using key_type = K

Definition at line 55 of file id_set.h.

◆ pointer

using pointer = void

Definition at line 61 of file id_set.h.

◆ reference

using reference = K

Definition at line 59 of file id_set.h.

◆ size_type

using size_type = typename StorageType::size_type

Definition at line 57 of file id_set.h.

◆ StorageType

using StorageType = absl::flat_hash_set<IdType>

Definition at line 54 of file id_set.h.

◆ value_type

Definition at line 56 of file id_set.h.

Constructor & Destructor Documentation

◆ IdSet() [1/4]

IdSet ( )
default

◆ IdSet() [2/4]

IdSet ( InputIt  first,
InputIt  last 
)
inline

Definition at line 231 of file id_set.h.

◆ IdSet() [3/4]

IdSet ( std::initializer_list< value_type ilist)
inline

Definition at line 236 of file id_set.h.

◆ IdSet() [4/4]

IdSet ( const ModelStorage storage,
StorageType  values 
)
inline

Definition at line 222 of file id_set.h.

Member Function Documentation

◆ begin()

IdSet< K >::const_iterator begin
inline

Definition at line 246 of file id_set.h.

◆ cbegin()

IdSet< K >::const_iterator cbegin
inline

Definition at line 241 of file id_set.h.

◆ cend()

IdSet< K >::const_iterator cend
inline

Definition at line 251 of file id_set.h.

◆ clear()

void clear
inline

Definition at line 261 of file id_set.h.

◆ contains()

bool contains ( const K &  k) const
inline

Definition at line 336 of file id_set.h.

◆ count()

IdSet< K >::size_type count ( const K &  k) const
inline

Definition at line 330 of file id_set.h.

◆ emplace()

std::pair< typename IdSet< K >::const_iterator, bool > emplace ( const K &  k)
inline

Definition at line 286 of file id_set.h.

◆ empty()

bool empty ( ) const
inline

Definition at line 118 of file id_set.h.

◆ end()

IdSet< K >::const_iterator end
inline

Definition at line 256 of file id_set.h.

◆ equal_range()

std::pair< typename IdSet< K >::const_iterator, typename IdSet< K >::const_iterator > equal_range ( const K &  k) const
inline

Definition at line 349 of file id_set.h.

◆ erase() [1/3]

IdSet< K >::size_type erase ( const K &  k)
inline

Definition at line 295 of file id_set.h.

◆ erase() [2/3]

IdSet< K >::const_iterator erase ( const_iterator  first,
const_iterator  last 
)
inline

Definition at line 313 of file id_set.h.

◆ erase() [3/3]

void erase ( const_iterator  pos)
inline

Definition at line 305 of file id_set.h.

◆ find()

IdSet< K >::const_iterator find ( const K &  k) const
inline

Definition at line 342 of file id_set.h.

◆ insert() [1/3]

std::pair< typename IdSet< K >::const_iterator, bool > insert ( const K &  k)
inline

Definition at line 267 of file id_set.h.

◆ insert() [2/3]

void insert ( InputIt  first,
InputIt  last 
)
inline

Definition at line 274 of file id_set.h.

◆ insert() [3/3]

void insert ( std::initializer_list< value_type ilist)
inline

Definition at line 281 of file id_set.h.

◆ raw_set()

const StorageType& raw_set ( ) const
inline

Definition at line 145 of file id_set.h.

◆ reserve()

void reserve ( size_type  count)
inline

Definition at line 121 of file id_set.h.

◆ size()

size_type size ( ) const
inline

Definition at line 119 of file id_set.h.

◆ storage()

const ModelStorage* storage ( ) const
inline

Definition at line 146 of file id_set.h.

◆ swap()

void swap ( IdSet< K > &  other)
inline

Definition at line 323 of file id_set.h.


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