[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eIntVarLocalSearchHandler\u003c/code\u003e is a class within the OR-Tools constraint solver that manages the local search process for integer variables.\u003c/p\u003e\n"],["\u003cp\u003eIt works in conjunction with \u003ccode\u003eIntVarLocalSearchOperator\u003c/code\u003e to define how variable values are changed during the search.\u003c/p\u003e\n"],["\u003cp\u003eThe handler provides methods like \u003ccode\u003eAddToAssignment\u003c/code\u003e, \u003ccode\u003eValueFromAssignment\u003c/code\u003e, \u003ccode\u003eOnAddVars\u003c/code\u003e, and \u003ccode\u003eOnRevertChanges\u003c/code\u003e to control the search process and variable assignments.\u003c/p\u003e\n"],["\u003cp\u003eUsers can extend this class to implement custom local search behaviors for their specific problem constraints.\u003c/p\u003e\n"]]],["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"],null,["# IntVarLocalSearchHandler\n\nC++ Reference: class IntVarLocalSearchHandler\n=============================================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|--------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`AddToAssignment`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L946) | Return type: `void ` Arguments: `IntVar* var, int64_t value, bool active, std::vector\u003cint\u003e* assignment_indices, int64_t index, Assignment* assignment` \u003cbr /\u003e |\n| [`IntVarLocalSearchHandler`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L942) | \u003cbr /\u003e |\n| [`IntVarLocalSearchHandler`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L943) | \u003cbr /\u003e Arguments: `const IntVarLocalSearchHandler& other` \u003cbr /\u003e |\n| [`IntVarLocalSearchHandler`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L945) | Return type: `explicit ` Arguments: `IntVarLocalSearchOperator* op` \u003cbr /\u003e |\n| [`OnAddVars`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L972) | Return type: `void ` \u003cbr /\u003e |\n| [`OnRevertChanges`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L971) | Return type: `void ` Arguments: `int64_t index, int64_t value` \u003cbr /\u003e |\n| [`ValueFromAssignment`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L969) | Return type: `bool ` Arguments: `const Assignment& assignment, IntVar* var, int64_t index, int64_t* value` \u003cbr /\u003e |"]]