|
||||||||||
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
public abstract class AbstractIntSConstraint
An abstract class for all implementations of listeners over search variables.
Field Summary |
---|
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 | |
---|---|
protected |
AbstractIntSConstraint(int priority,
IntDomainVar[] vars)
Constructs a constraint with the specified priority. |
Method Summary | |
---|---|
void |
awakeOnBounds(int varIndex)
|
void |
awakeOnInf(int varIdx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int idx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRem(int varIdx,
int val)
Default propagation on one value removal: propagation on domain revision. |
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 varIdx)
Default propagation on improved upper bound: propagation on domain revision. |
SConstraintType |
getConstraintType()
Return the type of constraint, ie the type of variable involved in the constraint |
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
boolean |
isSatisfied()
Default implementation of the isSatisfied by delegating to the isSatisfied(int[] tuple) |
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 ! |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, pretty, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, awake, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, propagate, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected AbstractIntSConstraint(int priority, IntDomainVar[] vars)
priority
- The wished priority.Method Detail |
---|
public void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntPropagator
ContradictionException
public void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
awakeOnRemovals
in interface IntPropagator
idx
-
ContradictionException
public void awakeOnBounds(int varIndex) throws ContradictionException
awakeOnBounds
in interface IntPropagator
ContradictionException
public boolean isConsistent()
isConsistent
in class Propagator
public boolean isSatisfied()
isSatisfied
in interface SConstraint<IntDomainVar>
public boolean isSatisfied(int[] tuple)
isSatisfied
in interface IntPropagator
tuple
-
public void awakeOnInf(int varIdx) throws ContradictionException
awakeOnInf
in interface IntPropagator
ContradictionException
public void awakeOnSup(int varIdx) throws ContradictionException
awakeOnSup
in interface IntPropagator
ContradictionException
public void awakeOnRem(int varIdx, int val) throws ContradictionException
awakeOnRem
in interface IntPropagator
ContradictionException
public SConstraintType getConstraintType()
SConstraint
getConstraintType
in interface SConstraint<IntDomainVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |