|
||||||||||
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<Var>
choco.kernel.solver.constraints.set.AbstractMixedSetIntSConstraint
choco.kernel.solver.constraints.set.AbstractBinSetIntSConstraint
choco.cp.solver.constraints.set.SetCard
public final class SetCard
Field Summary | |
---|---|
protected boolean |
inf
|
protected boolean |
sup
|
Fields inherited from class choco.kernel.solver.constraints.set.AbstractBinSetIntSConstraint |
---|
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 | |
---|---|
SetCard(SetVar sv,
IntDomainVar iv,
boolean inf,
boolean sup)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
void |
awakeOnEnvRemovals(int idx,
DisposableIntIterator deltaDomain)
BEWARE: No need to dipose the iterator, this done in the calling methode |
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int varIdx)
Default propagation on instantiation. |
void |
awakeOnkerAdditions(int idx,
DisposableIntIterator deltaDomain)
BEWARE: No need to dipose the iterator, this done in the calling methode |
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()
|
int |
getFilteredEventMask(int idx)
|
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied()
Semantic: Testing if the constraint is satisfied. |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
void |
reactOnInfAndEnvEvents(int envSize)
|
void |
reactOnSupAndKerEvents(int kerSize)
|
String |
toString()
|
Methods inherited from class choco.kernel.solver.constraints.set.AbstractBinSetIntSConstraint |
---|
getIntVar, getSetVar |
Methods inherited from class choco.kernel.solver.constraints.set.AbstractMixedSetIntSConstraint |
---|
awakeOnBounds, awakeOnEnv, awakeOnKer, awakeOnRem, getConstraintType, 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, 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 inf
protected boolean sup
Constructor Detail |
---|
public SetCard(SetVar sv, IntDomainVar iv, boolean inf, boolean sup)
Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractSConstraint<Var>
CloneNotSupportedException
- Clone not supported exceptionpublic void reactOnInfAndEnvEvents(int envSize) throws ContradictionException
ContradictionException
public void reactOnSupAndKerEvents(int kerSize) throws ContradictionException
ContradictionException
public void filter() throws ContradictionException
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractMixedSetIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractMixedSetIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractMixedSetIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractMixedSetIntSConstraint
ContradictionException
public void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
AbstractMixedSetIntSConstraint
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class AbstractMixedSetIntSConstraint
ContradictionException
public void awakeOnkerAdditions(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
SetPropagator
awakeOnkerAdditions
in interface SetPropagator
awakeOnkerAdditions
in class AbstractMixedSetIntSConstraint
ContradictionException
public void awakeOnEnvRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
SetPropagator
awakeOnEnvRemovals
in interface SetPropagator
awakeOnEnvRemovals
in class AbstractMixedSetIntSConstraint
ContradictionException
public void awakeOnInst(int varIdx) throws ContradictionException
SetPropagator
awakeOnInst
in interface IntPropagator
awakeOnInst
in interface SetPropagator
awakeOnInst
in class AbstractMixedSetIntSConstraint
ContradictionException
public boolean isSatisfied()
SConstraint
public String toString()
toString
in class AbstractSConstraint<Var>
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<Var>
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 boolean isConsistent()
AbstractMixedSetIntSConstraint
isConsistent
in class AbstractMixedSetIntSConstraint
public Boolean isEntailed()
AbstractSConstraint
isEntailed
in class AbstractSConstraint<Var>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |