Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class ChangeValue
Note: This documentation is automatically generated.
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).
Method |
ChangeValue | Return type: explicit Arguments: const std::vector<IntVar*>& vars |
~ChangeValue | |
ModifyValue | Return type: virtual int64_t Arguments: int64_t index, int64_t value |
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 `ChangeValue` class defines operators that modify variable values, with each neighbor representing one modified variable. Subclasses must implement `ModifyValue` to specify how a variable's new value is determined based on its current value and index. The class provides a constructor `ChangeValue` which takes a vector of `IntVar*` as arguments and a virtual method `ModifyValue` that takes `index` and the `value` as arguments. The class also defines a destructor `~ChangeValue`.\n"],null,[]]