C++ Reference: class IntExpr
Note: This documentation is automatically generated.
The class IntExpr is the base of all integer expressions in constraint programming. It contains the basic protocol for an expression:- setting and modifying its bound
- querying if it is bound
- listening to events modifying its bounds
- casting it into a variable (instance of IntVar)
Method | |
---|---|
Accept | Return type: Arguments: Accepts the given visitor. |
Bound | Return type: Returns true if the min and the max of the expression are equal. |
IntExpr | Return type: Arguments: |
~IntExpr | |
IsVar | Return type: Returns true if the expression is indeed a variable. |
Max | Return type: |
Min | Return type: |
Range | Return type: Arguments: By default calls Min() and Max(), but can be redefined when Min and Max code can be factorized. |
SetMax | Return type: Arguments: |
SetMin | Return type: Arguments: |
SetRange | Return type: Arguments: This method sets both the min and the max of the expression. |
SetValue | Return type: Arguments: This method sets the value of the expression. |
Var | Return type: Creates a variable from the expression. |
VarWithName | Return type: Arguments: Creates a variable from the expression and set the name of the resulting var. If the expression is already a variable, then it will set the name of the expression, possibly overwriting it. This is just a shortcut to Var() followed by set_name(). |
WhenRange | Return type: Arguments: Attach a demon that will watch the min or the max of the expression. |
WhenRange | Return type: Arguments: Attach a demon that will watch the min or the max of the expression. |
WhenRange | Return type: Arguments: Attach a demon that will watch the min or the max of the expression. |