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

A basic backtrackable multi map that can only grow (except on backtrack). More...

#include <rev.h>

Inheritance diagram for operations_research::RevGrowingMultiMap< Key, Value >:
operations_research::ReversibleInterface

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).
 

Detailed Description

template<class Key, class Value>
class operations_research::RevGrowingMultiMap< Key, Value >

A basic backtrackable multi map that can only grow (except on backtrack).

Definition at line 253 of file rev.h.

Member Function Documentation

◆ Add()

template<class Key , class Value >
void operations_research::RevGrowingMultiMap< Key, Value >::Add ( Key key,
Value value )

Adds a new value at the given key.

Definition at line 307 of file rev.h.

◆ SetLevel()

template<class Key , class Value >
void operations_research::RevGrowingMultiMap< Key, Value >::SetLevel ( int level)
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.

Definition at line 277 of file rev.h.

◆ Values()

template<class Key , class Value >
const std::vector< Value > & operations_research::RevGrowingMultiMap< Key, Value >::Values ( Key key) const

Returns the list of values for a given key (can be empty).

Definition at line 299 of file rev.h.


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