|
||||||||||
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.AbstractBinIntSConstraint
choco.cp.solver.constraints.integer.SignOp
public final class SignOp
Field Summary | |
---|---|
protected boolean |
same
enforce the two variables to take the same sign 0 is considered to have both signs if same is true and a different sign if same is false |
Fields inherited from class choco.kernel.solver.constraints.integer.AbstractBinIntSConstraint |
---|
v0, v1 |
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 | |
---|---|
SignOp(IntDomainVar x0,
IntDomainVar x1,
boolean same)
|
Method Summary | |
---|---|
void |
awakeOnBounds(int varIndex)
|
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int idx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRemovals(int idx,
DisposableIntIterator deltaDomain)
The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
Object |
clone()
Clone the constraint |
void |
filter()
|
void |
filterNotSame(IntDomainVar x1,
IntDomainVar x2)
|
void |
filterSame(IntDomainVar x1,
IntDomainVar x2)
|
int |
getFilteredEventMask(int idx)
|
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
Boolean |
isEntailed()
Checks if the listeners must be checked or must fail. |
boolean |
isSatisfied(int[] tuple)
Checks if the constraint is satisfied when the variables are instantiated. |
AbstractSConstraint<IntDomainVar> |
opposite(Solver solver)
Get the opposite constraint |
String |
pretty()
pretty printing of the object. |
void |
propagate()
The one and only propagation method, using foward checking |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnRem, getConstraintType, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, awake, 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 |
Field Detail |
---|
protected boolean same
Constructor Detail |
---|
public SignOp(IntDomainVar x0, IntDomainVar x1, boolean same)
x0
- first IntDomainVarx1
- second IntDomainVarsame
- The search constant used in the disequality.Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractSConstraint<IntDomainVar>
CloneNotSupportedException
- Clone not supported exceptionpublic void filterSame(IntDomainVar x1, IntDomainVar x2) throws ContradictionException
ContradictionException
public void filterNotSame(IntDomainVar x1, IntDomainVar x2) throws ContradictionException
ContradictionException
public void filter() throws ContradictionException
ContradictionException
public void propagate() throws ContradictionException
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void awakeOnBounds(int varIndex) throws ContradictionException
awakeOnBounds
in interface IntPropagator
awakeOnBounds
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
AbstractIntSConstraint
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class AbstractIntSConstraint
ContradictionException
public Boolean isEntailed()
isEntailed
in class AbstractSConstraint<IntDomainVar>
public boolean isSatisfied(int[] tuple)
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public boolean isConsistent()
isConsistent
in class AbstractIntSConstraint
public AbstractSConstraint<IntDomainVar> opposite(Solver solver)
AbstractSConstraint
opposite
in interface SConstraint<IntDomainVar>
opposite
in class AbstractSConstraint<IntDomainVar>
solver
- the current solver
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |