Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
A basic backtrackable multi map that can only grow (except on backtrack). More...
#include <rev.h>
Public Member Functions | |
void | SetLevel (int level) final |
void | Add (Key key, Value value) |
Adds a new value at the given key. | |
const std::vector< Value > & | Values (Key key) const |
Returns the list of values for a given key (can be empty). | |
A basic backtrackable multi map that can only grow (except on backtrack).
void operations_research::RevGrowingMultiMap< Key, Value >::Add | ( | Key | key, |
Value | value ) |
|
finalvirtual |
Initially a reversible class starts at level zero. Increasing the level saves the state of the current old level. Decreasing the level restores the state to what it was at this level and all higher levels are forgotten. Everything done at level zero cannot be backtracked over.
The level is assumed to be non-negative.
This is ok even if level == Level().
Implements operations_research::ReversibleInterface.
const std::vector< Value > & operations_research::RevGrowingMultiMap< Key, Value >::Values | ( | Key | key | ) | const |