|
||||||||||
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<SetVar>
choco.kernel.solver.constraints.set.AbstractSetSConstraint
choco.kernel.solver.constraints.set.AbstractTernSetSConstraint
choco.cp.solver.constraints.set.SetUnion
public final class SetUnion
A constraint stating that a set is the union of two others There are seven propagation rules for the constraint sv3 = union(sv1, sv2) Ker(sv1) contains Ker(sv3) Ker(sv2) contains Ker(sv3) Ker(sv3) contains (Ker(sv1) inter Ker(sv2)) Env(v3) disjoint Complement(Env(v1)) Env(v3) disjoint Complement(Env(v2)) Env(v2) disjoint Ker(v1) inter Complement(Env(v3)) Env(v1) disjoint Ker(v2) inter Complement(Env(v3))
Field Summary |
---|
Fields inherited from class choco.kernel.solver.constraints.set.AbstractTernSetSConstraint |
---|
v0, v1, v2 |
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 | |
---|---|
SetUnion(SetVar sv1,
SetVar sv2,
SetVar sv3)
Enforce sv3 to be the union of sv1 and sv2 |
Method Summary | |
---|---|
void |
awakeOnEnv(int varIdx,
int x)
Default propagation on enveloppe modification: propagation on removing a value from the enveloppe. |
void |
awakeOnInst(int varIdx)
Default propagation on instantiation. |
void |
awakeOnKer(int varIdx,
int x)
Default propagation on kernel modification: propagation on adding a value to the kernel. |
Object |
clone()
Clone the constraint |
int |
getFilteredEventMask(int idx)
|
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
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. |
String |
toString()
|
Methods inherited from class choco.kernel.solver.constraints.set.AbstractSetSConstraint |
---|
awakeOnEnvRemovals, awakeOnkerAdditions, getConstraintType |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, setConstraintIndex, setExtension, setVar |
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 |
Constructor Detail |
---|
public SetUnion(SetVar sv1, SetVar sv2, SetVar sv3)
sv1
- the first setsv2
- the second setsv3
- the union setMethod Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractSConstraint<SetVar>
CloneNotSupportedException
- Clone not supported exceptionpublic void awakeOnKer(int varIdx, int x) throws ContradictionException
SetPropagator
awakeOnKer
in interface SetPropagator
awakeOnKer
in class AbstractSetSConstraint
ContradictionException
public void awakeOnEnv(int varIdx, int x) throws ContradictionException
SetPropagator
awakeOnEnv
in interface SetPropagator
awakeOnEnv
in class AbstractSetSConstraint
ContradictionException
public void awakeOnInst(int varIdx) throws ContradictionException
SetPropagator
awakeOnInst
in interface SetPropagator
awakeOnInst
in class AbstractSetSConstraint
ContradictionException
public void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic String toString()
toString
in class AbstractSConstraint<SetVar>
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<SetVar>
public boolean isSatisfied()
SConstraint
public boolean isConsistent()
Propagator
isConsistent
in class Propagator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |