OR-Tools  8.2
RevArray< T >

Detailed Description

template<class T>
class operations_research::RevArray< T >

Reversible array of POD types.

It contains the stamp optimization. I.e., the SaveValue call is done only once per node of the search tree. Please note that actual stamp always starts at 1, thus an initial value of 0 always triggers the first SaveValue.

Definition at line 3777 of file constraint_solver.h.

Public Member Functions

 RevArray (int size, const T &val)
 
 ~RevArray ()
 
int64 size () const
 
const T & Value (int index) const
 
const T & operator[] (int index) const
 
void SetValue (Solver *const s, int index, const T &val)
 

Constructor & Destructor Documentation

◆ RevArray()

RevArray ( int  size,
const T &  val 
)
inline

Definition at line 3779 of file constraint_solver.h.

◆ ~RevArray()

~RevArray ( )
inline

Definition at line 3787 of file constraint_solver.h.

Member Function Documentation

◆ operator[]()

const T& operator[] ( int  index) const
inline

Definition at line 3794 of file constraint_solver.h.

◆ SetValue()

void SetValue ( Solver *const  s,
int  index,
const T &  val 
)
inline

Definition at line 3797 of file constraint_solver.h.

◆ size()

int64 size ( ) const
inline

Definition at line 3789 of file constraint_solver.h.

◆ Value()

const T& Value ( int  index) const
inline

Definition at line 3791 of file constraint_solver.h.


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