|
||||||||||
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.ElementG
public final class ElementG
Field Summary | |
---|---|
protected IStateInt[] |
domainSize
|
protected IStateInt |
lastIndexInf
|
protected IStateInt |
lastIndexSup
|
protected IStateInt |
lastVarInf
|
protected IStateInt |
lastVarSup
|
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 | |
---|---|
ElementG(IntDomainVar index,
int[] values,
IntDomainVar var,
IEnvironment environment)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
void |
awakeOnBounds(int varIdx)
|
void |
awakeOnInf(int i)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int i)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRem(int i,
int x)
Default propagation on one value removal: propagation on domain revision. |
void |
awakeOnSup(int i)
Default propagation on improved upper bound: propagation on domain revision. |
Object |
clone()
Clone the constraint |
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied()
Default implementation of the isSatisfied by delegating to the isSatisfied(int[] tuple) |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
String |
toString()
|
protected void |
updateIndexFromValue(int v)
|
protected void |
updateValueFromIndex(int i)
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnRemovals, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, opposite, setConstraintIndex, setExtension, setVar |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getFilteredEventMask, 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 IStateInt lastIndexInf
protected IStateInt lastIndexSup
protected IStateInt lastVarInf
protected IStateInt lastVarSup
protected IStateInt[] domainSize
Constructor Detail |
---|
public ElementG(IntDomainVar index, int[] values, IntDomainVar var, IEnvironment environment)
Method Detail |
---|
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractSConstraint<IntDomainVar>
CloneNotSupportedException
- Clone not supported exceptionpublic String toString()
toString
in class AbstractSConstraint<IntDomainVar>
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public void awakeOnInf(int i) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int i) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnBounds(int varIdx) throws ContradictionException
awakeOnBounds
in interface IntPropagator
awakeOnBounds
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int i) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRem(int i, int x) throws ContradictionException
AbstractIntSConstraint
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public Boolean isEntailed()
AbstractSConstraint
isEntailed
in class AbstractSConstraint<IntDomainVar>
public boolean isSatisfied()
AbstractIntSConstraint
isSatisfied
in interface SConstraint<IntDomainVar>
isSatisfied
in class AbstractIntSConstraint
public void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionprotected void updateValueFromIndex(int i) throws ContradictionException
ContradictionException
protected void updateIndexFromValue(int v) throws ContradictionException
ContradictionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |