C++ Reference: class Constraint
Note: This documentation is automatically generated.
A constraint is the main modeling object. It provides two methods:- Post() is responsible for creating the demons and attaching them to immediate demons().
- InitialPropagate() is called once just after Post and performs the initial propagation. The subsequent propagations will be performed by the demons Posted during the post() method.
Method | |
---|---|
Accept | Return type: Arguments: Accepts the given visitor. |
Constraint | Return type: Arguments: |
~Constraint | |
DebugString | Return type: |
InitialPropagate | Return type: This method performs the initial propagation of the constraint. It is called just after the post. |
IsCastConstraint | Return type: Is the constraint created by a cast from expression to integer variable? |
Post | Return type: This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables. |
PostAndPropagate | Return type: Calls Post and then Propagate to initialize the constraints. This is usually done in the root node. |
Var | Return type: Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). It returns nullptr if the constraint does not support this API. |