C++ Reference: class IntVar
Note: This documentation is automatically generated.
Method | |
---|---|
DebugString | Return type: |
Domain | Return type: Returns the domain of the variable. Note that we keep the fully qualified return type as compilation fails with gcc otherwise. |
index | Return type: Returns the index of the variable in the model. This will be non-negative. |
IntVar | 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. |
IntVar | Return type: Arguments: 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. |
Name | Return type: Returns the name of the variable (or the empty string if not set). |
ToBoolVar | Return type: 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. |
WithName | Return type: Arguments: Sets the name of the variable. |