|
||||||||||
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.AmongGAC
public final class AmongGAC
User : cprudhom, fhermenie Mail : cprudhom(a)emn.fr Date : 22 fevr. 2010 Since : Choco 2.1.1
GCCAT: NVAR is the number of variables of the collection VARIABLES that take their value in VALUES.
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 | |
---|---|
AmongGAC(IntDomainVar[] vars,
int[] values,
IEnvironment environment)
Constructs a constraint with the specified priority. |
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
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 |
awakeOnSup(int varIdx)
Default propagation on improved upper bound: propagation on domain revision. |
int |
getFilteredEventMask(int idx)
|
protected void |
init()
|
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 ! |
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, awakeOnRemovals, getConstraintType, isConsistent |
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, 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 AmongGAC(IntDomainVar[] vars, int[] values, IEnvironment environment)
vars
is the counter.
vars
- (n-1) variables + N as countervalues
- counted valuesenvironment
- Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
protected void init()
public void awake() throws ContradictionException
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void propagate() throws ContradictionException
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRem(int varIdx, int val) throws ContradictionException
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInf(int varIdx) throws ContradictionException
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int varIdx) throws ContradictionException
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public boolean isSatisfied()
isSatisfied
in interface SConstraint<IntDomainVar>
isSatisfied
in class AbstractIntSConstraint
public boolean isSatisfied(int[] tuple)
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
tuple
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |