- java.lang.Object
-
- org.chocosolver.solver.constraints.Constraint
-
- org.chocosolver.solver.constraints.Arithmetic
-
public class Arithmetic extends Constraint
A constraint dedicated to arithmetic operations.
There are three available definitions:- VAR op CSTE,
- VAR op VAR,
- VAR op VAR op CSTE
- Since:
- 21/06/12
- Author:
- Charles Prud'homme
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.chocosolver.solver.constraints.Constraint
Constraint.Status
-
-
Field Summary
Fields Modifier and Type Field Description protected int
cste
-
Fields inherited from class org.chocosolver.solver.constraints.Constraint
boolReif, propagators
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Arithmetic(String name, IntVar[] vars, Operator op1, Operator op2, int cste, Propagator prop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Constraint
makeOpposite()
Make the opposite constraint of this.-
Methods inherited from class org.chocosolver.solver.constraints.Constraint
checkNewStatus, computeMaxPriority, declareAs, getCidxInModel, getName, getOpposite, getPropagator, getPropagators, getStatus, ignore, isReified, isSatisfied, merge, post, reify, reifyWith, setName, setOpposite, toString
-
-
-
-
Constructor Detail
-
Arithmetic
protected Arithmetic(String name, IntVar[] vars, Operator op1, Operator op2, int cste, Propagator prop)
-
-
Method Detail
-
makeOpposite
public Constraint makeOpposite()
Description copied from class:Constraint
Make the opposite constraint of this. BEWARE: this method should never be called by the user but it can be overridden to provide better constraint negations- Overrides:
makeOpposite
in classConstraint
-
-