|
||||||||||
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.global.AtMostNValue
public final class AtMostNValue
Enforce the number of identical values wihtin a list of variables to be at most a given variable. Created by IntelliJ IDEA. User: hcambaza Date: 08-Jan-2007 Time: 09:13:13
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 | |
---|---|
AtMostNValue(IntDomainVar[] vars,
IntDomainVar nvalue)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
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 |
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. |
boolean |
isSatisfied(int[] tuple)
This method assumes that all variables are instantiated and checks if the values are consistent with the constraint. |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRem, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, 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, getFilteredEventMask, 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 AtMostNValue(IntDomainVar[] vars, IntDomainVar nvalue)
Method Detail |
---|
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
AbstractIntSConstraint
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class AbstractIntSConstraint
ContradictionException
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 isSatisfied(int[] tuple)
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |