|
||||||||||
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.AbstractLargeIntSConstraint
choco.cp.solver.constraints.reified.ReifiedIntSConstraint
public class ReifiedIntSConstraint
A constraint that allows to reify another constraint into a boolean value. b = 1 <=> cons is satisfied b = 0 <=> oppositeCons is satisfied
cons and oppositeCons do not need to be really the constraint and its opposite, it can be two different constraints as well
Field Summary | |
---|---|
protected int[] |
scopeCons
|
protected int[] |
scopeOCons
|
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 |
Method Summary | |
---|---|
void |
addExtension(int extensionNumber)
Adds a new extension. |
void |
addListener(boolean dynamicAddition)
This function connects a constraint with its variables in several ways. |
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
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 |
awakeOnRem(int idx,
int x)
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 idx)
Default propagation on improved upper bound: propagation on domain revision. |
void |
filter()
|
void |
filterReifiedConstraintFromCons()
|
int |
getFilteredEventMask(int idx)
|
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 ! |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
void |
setPropagationEngine(PropagationEngine propEng)
Define the propagation engine within the constraint. |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] scopeCons
protected int[] scopeOCons
Method Detail |
---|
public void addExtension(int extensionNumber)
addExtension
in interface IExtensionnable
addExtension
in class AbstractSConstraint<IntDomainVar>
extensionNumber
- should use the number returned by getAbstractSConstraintExtensionNumberpublic void filterReifiedConstraintFromCons() throws ContradictionException
ContradictionException
public final int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public final void filter() throws ContradictionException
ContradictionException
public final void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic final void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public final void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public final void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public final void awakeOnRem(int idx, int x) throws ContradictionException
AbstractIntSConstraint
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public final void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
AbstractIntSConstraint
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class AbstractIntSConstraint
ContradictionException
public final void awakeOnBounds(int varIndex) throws ContradictionException
awakeOnBounds
in interface IntPropagator
awakeOnBounds
in class AbstractIntSConstraint
ContradictionException
public void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void addListener(boolean dynamicAddition)
AbstractSConstraint
addListener
in class AbstractSConstraint<IntDomainVar>
dynamicAddition
- if the addition should be dynamicalpublic void setPropagationEngine(PropagationEngine propEng)
ContradictionException
.
setPropagationEngine
in class Propagator
propEng
- the current propagation enginepublic String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public boolean isSatisfied(int[] tuple)
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
tuple
- value for each variable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |