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

#include <constraint_solveri.h>

Classes

class  Iterator
 This iterator is not stable with respect to deletion. More...
 

Public Member Functions

 SimpleRevFIFO ()
 
void Push (Solver *const s, T val)
 
void PushIfNotTop (Solver *const s, T val)
 Pushes the var on top if is not a duplicate of the current top object.
 
const T * Last () const
 Returns the last item of the FIFO.
 
T * MutableLast ()
 
const T & LastValue () const
 Returns the last value in the FIFO.
 
void SetLastValue (const T &v)
 Sets the last value in the FIFO.
 

Detailed Description

template<class T>
class operations_research::SimpleRevFIFO< T >

This class represent a reversible FIFO structure. The main difference w.r.t a standard FIFO structure is that a Solver is given as parameter to the modifiers such that the solver can store the backtrack information Iterator's traversing order should not be changed, as some algorithm depend on it to be consistent. It's main use is to store a list of demons in the various classes of variables.

Definition at line 148 of file constraint_solveri.h.

Constructor & Destructor Documentation

◆ SimpleRevFIFO()

template<class T >
operations_research::SimpleRevFIFO< T >::SimpleRevFIFO ( )
inline

Definition at line 178 of file constraint_solveri.h.

Member Function Documentation

◆ Last()

template<class T >
const T * operations_research::SimpleRevFIFO< T >::Last ( ) const
inline

Returns the last item of the FIFO.

Definition at line 200 of file constraint_solveri.h.

◆ LastValue()

template<class T >
const T & operations_research::SimpleRevFIFO< T >::LastValue ( ) const
inline

Returns the last value in the FIFO.

Definition at line 207 of file constraint_solveri.h.

◆ MutableLast()

template<class T >
T * operations_research::SimpleRevFIFO< T >::MutableLast ( )
inline

Definition at line 204 of file constraint_solveri.h.

◆ Push()

template<class T >
void operations_research::SimpleRevFIFO< T >::Push ( Solver *const s,
T val )
inline

Definition at line 180 of file constraint_solveri.h.

◆ PushIfNotTop()

template<class T >
void operations_research::SimpleRevFIFO< T >::PushIfNotTop ( Solver *const s,
T val )
inline

Pushes the var on top if is not a duplicate of the current top object.

Definition at line 193 of file constraint_solveri.h.

◆ SetLastValue()

template<class T >
void operations_research::SimpleRevFIFO< T >::SetLastValue ( const T & v)
inline

Sets the last value in the FIFO.

Definition at line 213 of file constraint_solveri.h.


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