C++ Reference: class VarLocalSearchOperator
Note: This documentation is automatically generated.
Method |
Activate | Return type: void Arguments: int64_t index |
Activated | Return type: bool Arguments: int64_t index |
AddVars | Return type: void Arguments: const std::vector<V*>& vars |
ApplyChanges | Return type: bool Arguments: Assignment* delta, Assignment* deltadelta |
Deactivate | Return type: void Arguments: int64_t index |
HoldsDelta | Return type: bool |
IsIncremental | Return type: virtual bool |
OldValue | Return type: const Val& Arguments: int64_t index |
OnStart | Return type: virtual void Called by Start() after synchronizing the operator with the current
assignment. Should be overridden instead of Start() to avoid calling
VarLocalSearchOperator::Start explicitly.
|
RevertChanges | Return type: void Arguments: bool incremental |
SetValue | Return type: void Arguments: int64_t index, const Val& value |
Size | Return type: int |
SkipUnchanged | Return type: virtual bool Arguments: int index |
Start | Return type: void Arguments: const Assignment* assignment This method should not be overridden. Override OnStart() instead which is
called before exiting this method.
|
Value | Return type: const Val& Arguments: int64_t index Returns the value in the current assignment of the variable of given
index.
|
Var | Return type: V* Arguments: int64_t index Returns the variable of given index.
|
VarLocalSearchOperator | |
VarLocalSearchOperator | Return type: explicit Arguments: Handler var_handler |
~VarLocalSearchOperator | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[[["`VarLocalSearchOperator` is a C++ class in Google's OR-Tools library used for implementing local search operators that work on a set of variables."],["It provides methods to access and modify the values of these variables during the search process, such as `Value`, `SetValue`, `OldValue`, and `Var`."],["The class includes functionalities for managing the activation state of the operator (`Activate`, `Deactivate`, `Activated`) and applying/reverting changes to the assignment (`ApplyChanges`, `RevertChanges`)."],["`OnStart` is a virtual method intended for user implementation to define the operator's behavior, while methods like `Start`, `IsIncremental`, `HoldsDelta`, and `SkipUnchanged` contribute to the operator's interaction within the local search framework."]]],[]]