public class IsEqual extends AbstractConstraint
Factory.isEqual(IntVar, int)
Constructor and Description |
---|
IsEqual(BoolVar b,
IntVar x,
int c)
Returns a boolean variable representing
whether one variable is equal to the given constant.
|
Modifier and Type | Method and Description |
---|---|
void |
post()
Initializes the constraint when it is posted to the solver.
|
void |
propagate()
Propagates the constraint.
|
getSolver, isActive, isScheduled, setActive, setScheduled
public IsEqual(BoolVar b, IntVar x, int c)
x
- the variablec
- the constantb
- the boolean variable that is set to true
if and only if x takes the value cFactory.isEqual(IntVar, int)
public void post()
Constraint
post
in interface Constraint
post
in class AbstractConstraint
public void propagate()
Constraint
propagate
in interface Constraint
propagate
in class AbstractConstraint
Copyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.