Stay organized with collections
Save and categorize content based on your preferences.
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."],[],["The `VarLocalSearchOperator` class in C++ provides methods for managing variables in local search algorithms. Key actions include: activating/deactivating variables (`Activate`, `Deactivate`), adding variables (`AddVars`), applying/reverting changes (`ApplyChanges`, `RevertChanges`), and setting/getting values (`SetValue`, `Value`, `OldValue`). It allows checking if changes are tracked (`HoldsDelta`) and if the operator is incremental (`IsIncremental`). Additional actions are implemented for getting the size of variables (`Size`) and skipping unchanged variables (`SkipUnchanged`). It has a `OnStart` method that gets called once the operator has been started.\n"],null,[]]