A default constructed IntVar can be used to mean not defined yet.
However, it shouldn't be passed to any of the functions in this file.
Doing so will crash in debug mode and will result in an invalid model in
opt mode.
Cast BoolVar -> IntVar.
The IntVar will take the value 1 (when the bool is true) and 0 otherwise.
Warning: If you construct an IntVar from a negated BoolVar, this might
create a new variable in the model. Otherwise this just point to the same
underlying variable.
Cast IntVar -> BoolVar.
Warning: The domain of the var must be within {0,1}. If not, we crash
in debug mode, and in opt mode you will get an invalid model if you use
this BoolVar anywhere since it will not have a valid domain.
[[["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."],[[["`IntVar` is a C++ class with methods for managing integer variables, including getting or setting a domain and name."],["The `IntVar` can be cast from or to `BoolVar`, with the domain being within the range of `{0,1}` for `BoolVar`."],["An `IntVar` that is constructed as a default should not be passed to any of the functions as this will produce a crash in debug mode or an invalid model in opt mode."],["Methods are available to get the index and domain of a variable, and setting or returning the name."],["The `DebugString` method is available for returning a string representation of the `IntVar` state."]]],["The `IntVar` class in C++ has methods to interact with integer variables. `DebugString` returns a string representation, `Domain` retrieves the variable's domain, and `index` fetches its model index. `IntVar` also handles casting from/to `BoolVar` using `ToBoolVar` and an explicit constructor. `Name` retrieves the variable's name, and `WithName` sets it. A default constructed `IntVar` is undefined. It has the functionality to cast from a `BoolVar` to an `IntVar`.\n"]]