Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <bop_ls.h>
Public Member Functions | |
BacktrackableIntegerSet ()=default | |
void | ClearAndResize (IntType n) |
void | ChangeState (IntType i, bool should_be_inside) |
int | size () const |
const std::vector< IntType > & | Superset () const |
Returns a superset of the current set of integers. | |
void | AddBacktrackingLevel () |
void | BacktrackOneLevel () |
void | BacktrackAll () |
Implementation details. The declarations of those utility classes are in the .h for testing reasons. Maintains some information on a sparse set of integers in [0, n). More specifically this class:
|
default |
void operations_research::bop::BacktrackableIntegerSet< IntType >::AddBacktrackingLevel | ( | ) |
BacktrackOneLevel() backtracks to the state the class was in when the last AddBacktrackingLevel() was called. BacktrackAll() just restore the class to its state just after the last ClearAndResize().
void operations_research::bop::BacktrackableIntegerSet< IntType >::BacktrackAll | ( | ) |
void operations_research::bop::BacktrackableIntegerSet< IntType >::BacktrackOneLevel | ( | ) |
void operations_research::bop::BacktrackableIntegerSet< IntType >::ChangeState | ( | IntType | i, |
bool | should_be_inside ) |
void operations_research::bop::BacktrackableIntegerSet< IntType >::ClearAndResize | ( | IntType | n | ) |
Prepares the class for integers in [0, n) and initializes the set to the empty one. Note that this run in O(n). Once resized, it is better to call BacktrackAll() instead of this to clear the set.
|
inline |
|
inline |