|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractTernIntConstraint
choco.integer.constraints.TimesXYZ
public class TimesXYZ
a constraint modelling X * Y = Z
Field Summary |
---|
Fields inherited from class choco.integer.constraints.AbstractTernIntConstraint |
---|
cIdx0, cIdx1, cIdx2, v0, v1, v2 |
Fields inherited from class choco.integer.constraints.AbstractIntConstraint |
---|
logger |
Fields inherited from class choco.AbstractConstraint |
---|
active, constAwakeEvent, hook, priority |
Fields inherited from class choco.AbstractEntity |
---|
problem |
Constructor Summary | |
---|---|
TimesXYZ(IntDomainVar x,
IntDomainVar y,
IntDomainVar z)
|
Method Summary | |
---|---|
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. |
void |
awakeOnVar(int idx)
Default propagation on variable revision: full constraint re-propagation. |
protected void |
awakeOnX()
reaction when X (v0) is updated |
protected void |
awakeOnY()
|
protected void |
awakeOnZ()
|
protected int |
getXmaxIfNonZero()
|
protected int |
getXminIfNonZero()
|
protected int |
getYmaxIfNonZero()
|
protected int |
getYminIfNonZero()
|
protected int |
getZmax()
|
protected int |
getZmin()
|
java.lang.Boolean |
isEntailed()
Checks whether the constraint is definitely satisfied, no matter what further restrictions occur to the domain of its variables. |
boolean |
isSatisfied()
Semantic: Testing if the constraint is satisfied. |
void |
propagate()
Propagation for the constraint awake var. |
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.integer.constraints.AbstractTernIntConstraint |
---|
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, setConstraintIndex, setVar |
Methods inherited from class choco.integer.constraints.AbstractIntConstraint |
---|
awakeOnBounds, awakeOnRem, awakeOnRemovals, getSelfIndex, isConsistent |
Methods inherited from class choco.AbstractConstraint |
---|
addListener, awake, clone, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class choco.AbstractEntity |
---|
pretty |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.Propagator |
---|
awake, constAwake, delete, getEvent, getPlugIn, getPriority |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Constructor Detail |
---|
public TimesXYZ(IntDomainVar x, IntDomainVar y, IntDomainVar z)
Method Detail |
---|
public boolean isSatisfied()
Constraint
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnSup
in interface IntVarEventListener
awakeOnSup
in class AbstractIntConstraint
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnInf
in interface IntVarEventListener
awakeOnInf
in class AbstractIntConstraint
ContradictionException
public void awakeOnVar(int idx) throws ContradictionException
AbstractConstraint
awakeOnVar
in interface VarEventListener
awakeOnVar
in interface Propagator
awakeOnVar
in class AbstractConstraint
ContradictionException
public void awakeOnInst(int vIdx) throws ContradictionException
AbstractIntConstraint
awakeOnInst
in interface IntVarEventListener
awakeOnInst
in class AbstractIntConstraint
ContradictionException
protected void awakeOnX() throws ContradictionException
ContradictionException
protected void awakeOnY() throws ContradictionException
ContradictionException
protected void awakeOnZ() throws ContradictionException
ContradictionException
public java.lang.Boolean isEntailed()
Propagator
isEntailed
in interface Propagator
isEntailed
in class AbstractConstraint
protected int getXminIfNonZero()
protected int getXmaxIfNonZero()
protected int getYminIfNonZero()
protected int getYmaxIfNonZero()
protected int getZmin()
protected int getZmax()
public void propagate() throws ContradictionException
AbstractTernIntConstraint
propagate
in interface Propagator
propagate
in class AbstractTernIntConstraint
ContradictionException
- if a domain becomes empty or the
filtering algorithm infers a contradictionpublic 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 |