C++ Reference: class IntVarLocalSearchHandler
Note: This documentation is automatically generated.
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."],[[["`IntVarLocalSearchHandler` is a class within the OR-Tools constraint solver that manages the local search process for integer variables."],["It works in conjunction with `IntVarLocalSearchOperator` to define how variable values are changed during the search."],["The handler provides methods like `AddToAssignment`, `ValueFromAssignment`, `OnAddVars`, and `OnRevertChanges` to control the search process and variable assignments."],["Users can extend this class to implement custom local search behaviors for their specific problem constraints."]]],["The `IntVarLocalSearchHandler` class in C++ manages local search operations for integer variables. Key methods include: `AddToAssignment`, which adds variable assignments; `OnAddVars`, for handling newly added variables; and `OnRevertChanges`, to revert changes to a specific index and value. Additionally, `ValueFromAssignment` retrieves values for variables from an assignment. The class also features constructors for initialization and copying, along with a constructor that takes a `IntVarLocalSearchOperator` pointer.\n"]]