Google OR-Tools: operations_research::ChangeValue Class Reference
Defines operators which change the value of variables; each neighbor corresponds to one modified variable. Sub-classes have to define ModifyValue which determines what the new variable value is going to be (given the current value and the variable).
Definition at line 1348 of file constraint_solveri.h.
#include <constraint_solveri.h>

Public Member Functions | |
| ChangeValue (const std::vector< IntVar * > &vars) | |
| ~ChangeValue () override | |
| virtual int64_t | ModifyValue (int64_t index, int64_t value)=0 |
| Public Member Functions inherited from operations_research::IntVarLocalSearchOperator | |
| IntVarLocalSearchOperator (const std::vector< IntVar * > &vars, bool keep_inverse_values=false) | |
| ~IntVarLocalSearchOperator () override | |
| bool | HoldsDelta () const override |
| void | Start (const Assignment *assignment) override |
| virtual bool | IsIncremental () const |
| int | Size () const |
| int64_t | Value (int64_t index) const |
| IntVar * | Var (int64_t index) const |
| Returns the variable of given index. | |
| virtual bool | SkipUnchanged (int) const |
| int64_t | OldValue (int64_t index) const |
| int64_t | PrevValue (int64_t index) const |
| void | SetValue (int64_t index, int64_t value) |
| bool | Activated (int64_t index) const |
| void | Activate (int64_t index) |
| void | Deactivate (int64_t index) |
| bool | ApplyChanges (Assignment *delta, Assignment *deltadelta) const |
| void | RevertChanges (bool change_was_incremental) |
| void | AddVars (const std::vector< IntVar * > &vars) |
| bool | MakeNextNeighbor (Assignment *delta, Assignment *deltadelta) override |
| Public Member Functions inherited from operations_research::LocalSearchOperator | |
| LocalSearchOperator () | |
| ~LocalSearchOperator () override | |
| virtual void | EnterSearch () |
| virtual void | Reset () |
| virtual const LocalSearchOperator * | Self () const |
| virtual bool | HasFragments () const |
| Public Member Functions inherited from operations_research::BaseObject | |
| BaseObject () | |
| BaseObject (const BaseObject &)=delete | |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |
| virtual std::string | DebugString () const |
Protected Member Functions | |
| bool | MakeOneNeighbor () override |
| This method should not be overridden. Override ModifyValue() instead. | |
| Protected Member Functions inherited from operations_research::IntVarLocalSearchOperator | |
| int64_t | InverseValue (int64_t index) const |
| int64_t | OldInverseValue (int64_t index) const |
| void | AddToAssignment (IntVar *var, int64_t value, bool active, std::vector< int > *assignment_indices, int64_t index, Assignment *assignment) const |
|
explicit |
◆ ~ChangeValue()
|
override |
◆ MakeOneNeighbor()
|
overrideprotectedvirtual |
◆ ModifyValue()
|
pure virtual |
The documentation for this class was generated from the following files:
- ortools/constraint_solver/constraint_solveri.h
- ortools/constraint_solver/local_search.cc