|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.kernel.solver.constraints.integer.AbstractTernIntSConstraint
choco.cp.solver.constraints.integer.TimesXYZ
public final class TimesXYZ
a constraint modelling X * Y = Z [BUG 3297805]: fix
Field Summary |
---|
Fields inherited from class choco.kernel.solver.constraints.integer.AbstractTernIntSConstraint |
---|
v0, v1, v2 |
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
cIndices, constraintType, extensions, vars |
Fields inherited from class choco.kernel.solver.propagation.Propagator |
---|
active, constAwakeEvent, priority, propagationEngine |
Fields inherited from interface choco.kernel.solver.constraints.SConstraint |
---|
LOGGER |
Constructor Summary | |
---|---|
TimesXYZ(IntDomainVar x,
IntDomainVar y,
IntDomainVar z)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int vIdx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
protected void |
awakeOnX()
reaction when X (v0) is updated |
protected void |
awakeOnY()
|
protected void |
awakeOnZ()
|
void |
filter(int idx)
|
int |
getFilteredEventMask(int idx)
|
protected long |
getXmaxIfNonZero()
|
protected long |
getXminIfNonZero()
|
protected long |
getYmaxIfNonZero()
|
protected long |
getYminIfNonZero()
|
protected long |
getZmax()
|
protected long |
getZmin()
|
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied(int[] tuple)
TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet ! |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
void |
propagateZero()
propagate the fact that v2 (Z) is instantiated to 0 |
protected boolean |
shaveOnX()
Updating X and Y when Z can be 0 |
protected void |
shaveOnXandY()
|
protected boolean |
shaveOnY()
|
protected void |
shaveOnYandX()
|
protected boolean |
updateX()
Updating X and Y when Z cannot be 0 |
protected void |
updateXandY()
loop until a fix point is reach (see testProd14) |
protected boolean |
updateY()
|
protected void |
updateYandX()
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRem, awakeOnRemovals, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, opposite, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimesXYZ(IntDomainVar x, IntDomainVar y, IntDomainVar z)
Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void filter(int idx) throws ContradictionException
ContradictionException
public void awakeOnInst(int vIdx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
protected void awakeOnX() throws ContradictionException
ContradictionException
protected void awakeOnY() throws ContradictionException
ContradictionException
protected void awakeOnZ() throws ContradictionException
ContradictionException
public Boolean isEntailed()
AbstractSConstraint
isEntailed
in class AbstractSConstraint<IntDomainVar>
protected long getXminIfNonZero()
protected long getXmaxIfNonZero()
protected long getYminIfNonZero()
protected long getYmaxIfNonZero()
protected long getZmin()
protected long getZmax()
public void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void propagateZero() throws ContradictionException
ContradictionException
protected boolean updateX() throws ContradictionException
ContradictionException
protected boolean updateY() throws ContradictionException
ContradictionException
protected void updateXandY() throws ContradictionException
ContradictionException
protected void updateYandX() throws ContradictionException
ContradictionException
protected boolean shaveOnX() throws ContradictionException
ContradictionException
protected boolean shaveOnY() throws ContradictionException
ContradictionException
protected void shaveOnXandY() throws ContradictionException
ContradictionException
protected void shaveOnYandX() throws ContradictionException
ContradictionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |