Class PropDivXYZ
- java.lang.Object
-
- org.chocosolver.solver.constraints.Propagator<IntVar>
-
- org.chocosolver.solver.constraints.ternary.PropDivXYZ
-
- All Implemented Interfaces:
Comparable<Propagator>,ICause,Identity
public class PropDivXYZ extends Propagator<IntVar>
X/Y = Z A propagator for the constraint Z = X / Y where X, Y and Z are integer, possibly negative, variables The filtering algorithm both supports bounded and enumerated integer variables
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.constraints.Propagator
constraint, model, priority, reactToFineEvt, vars
-
-
Constructor Summary
Constructors Constructor Description PropDivXYZ(IntVar x, IntVar y, IntVar z)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ESatisEntailed()Check wetherthisis entailed according to the current state of its internal structure.protected booleanoppSign(IntVar a, IntVar b)A take the opposite signs of Bvoidpropagate(int evtmask)The main propagation method that filters according to the constraint defintionprotected booleansameSign(IntVar a, IntVar b)A take the signs of B-
Methods inherited from class org.chocosolver.solver.constraints.Propagator
addVariable, arity, compareTo, doFinePropagation, doFlush, doSchedule, doScheduleEvent, dynPriority, equals, fails, forcePropagate, forcePropagationOnBacktrack, getConstraint, getId, getModel, getNbVars, getPosition, getPriority, getPropagationConditions, getVar, getVars, getVIndice, getVIndices, hashCode, isActive, isCompletelyInstantiated, isPassive, isReifiedAndSilent, isStateLess, linkVariables, propagate, reactToFineEvent, setActive, setPassive, setPosition, setReifiedSilent, setReifiedTrue, setVIndices, toString, unlinkVariables, unschedule, why
-
-
-
-
Method Detail
-
propagate
public void propagate(int evtmask) throws ContradictionExceptionThe main propagation method that filters according to the constraint defintion- Specified by:
propagatein classPropagator<IntVar>- Parameters:
evtmask- : is it the initial propagation or not?- Throws:
ContradictionException
-
isEntailed
public ESat isEntailed()
Description copied from class:PropagatorCheck wetherthisis entailed according to the current state of its internal structure. At least, should check the satisfaction ofthis(when all is instantiated).- Specified by:
isEntailedin classPropagator<IntVar>- Returns:
- ESat.TRUE if entailed, ESat.FALSE if not entailed, ESat.UNDEFINED if unknown
-
sameSign
protected boolean sameSign(IntVar a, IntVar b) throws ContradictionException
A take the signs of B- Parameters:
a- first varb- second var- Throws:
ContradictionException
-
oppSign
protected boolean oppSign(IntVar a, IntVar b) throws ContradictionException
A take the opposite signs of B- Parameters:
a- first varb- second var- Throws:
ContradictionException
-
-