Public Types | Public Member Functions | Static Public Attributes | List of all members
operations_research::RevIntSet< T > Class Template Reference

--— RevIntSet --— More...

#include <constraint_solveri.h>

Public Types

typedef const T * const_iterator
 Iterators on the indices. More...
 

Public Member Functions

 RevIntSet (int capacity)
 Capacity is the fixed size of the set (it cannot grow). More...
 
 RevIntSet (int capacity, int *shared_positions, int shared_positions_size)
 Capacity is the fixed size of the set (it cannot grow). More...
 
 ~RevIntSet ()
 
int Size () const
 
int Capacity () const
 
Element (int i) const
 
RemovedElement (int i) const
 
void Insert (Solver *const solver, const T &elt)
 
void Remove (Solver *const solver, const T &value_index)
 
void Restore (Solver *const solver, const T &value_index)
 
void Clear (Solver *const solver)
 
const_iterator begin () const
 
const_iterator end () const
 

Static Public Attributes

static const int kNoInserted = -1
 

Detailed Description

template<class T>
class operations_research::RevIntSet< T >

--— RevIntSet --—

This is a special class to represent a 'residual' set of T. T must be an integer type. You fill it at first, and then during search, you can efficiently remove an element, and query the removed elements.

Definition at line 2345 of file constraint_solveri.h.

Member Typedef Documentation

◆ const_iterator

template<class T>
typedef const T* operations_research::RevIntSet< T >::const_iterator

Iterators on the indices.

Definition at line 2417 of file constraint_solveri.h.

Constructor & Destructor Documentation

◆ RevIntSet() [1/2]

template<class T>
operations_research::RevIntSet< T >::RevIntSet ( int  capacity)
inlineexplicit

Capacity is the fixed size of the set (it cannot grow).

Definition at line 2350 of file constraint_solveri.h.

◆ RevIntSet() [2/2]

template<class T>
operations_research::RevIntSet< T >::RevIntSet ( int  capacity,
int *  shared_positions,
int  shared_positions_size 
)
inline

Capacity is the fixed size of the set (it cannot grow).

Definition at line 2362 of file constraint_solveri.h.

◆ ~RevIntSet()

template<class T>
operations_research::RevIntSet< T >::~RevIntSet ( )
inline

Definition at line 2373 of file constraint_solveri.h.

Member Function Documentation

◆ begin()

template<class T>
const_iterator operations_research::RevIntSet< T >::begin ( ) const
inline

Definition at line 2418 of file constraint_solveri.h.

◆ Capacity()

template<class T>
int operations_research::RevIntSet< T >::Capacity ( ) const
inline

Definition at line 2381 of file constraint_solveri.h.

◆ Clear()

template<class T>
void operations_research::RevIntSet< T >::Clear ( Solver *const  solver)
inline

Definition at line 2414 of file constraint_solveri.h.

◆ Element()

template<class T>
T operations_research::RevIntSet< T >::Element ( int  i) const
inline

Definition at line 2383 of file constraint_solveri.h.

◆ end()

template<class T>
const_iterator operations_research::RevIntSet< T >::end ( ) const
inline

Definition at line 2419 of file constraint_solveri.h.

◆ Insert()

template<class T>
void operations_research::RevIntSet< T >::Insert ( Solver *const  solver,
const T &  elt 
)
inline

Definition at line 2395 of file constraint_solveri.h.

◆ Remove()

template<class T>
void operations_research::RevIntSet< T >::Remove ( Solver *const  solver,
const T &  value_index 
)
inline

Definition at line 2404 of file constraint_solveri.h.

◆ RemovedElement()

template<class T>
T operations_research::RevIntSet< T >::RemovedElement ( int  i) const
inline

Definition at line 2389 of file constraint_solveri.h.

◆ Restore()

template<class T>
void operations_research::RevIntSet< T >::Restore ( Solver *const  solver,
const T &  value_index 
)
inline

Definition at line 2409 of file constraint_solveri.h.

◆ Size()

template<class T>
int operations_research::RevIntSet< T >::Size ( ) const
inline

Definition at line 2379 of file constraint_solveri.h.

Member Data Documentation

◆ kNoInserted

template<class T>
const int operations_research::RevIntSet< T >::kNoInserted = -1
static

Definition at line 2347 of file constraint_solveri.h.


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