|
||||||||||
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.kernel.solver.constraints.global.matching.AbstractBipartiteGraph
choco.kernel.solver.constraints.global.matching.AbstractBipartiteMatching
choco.cp.solver.constraints.global.matching.AllDifferent
public final class AllDifferent
Standard alldiff constraint with generalized AC integer valued variables are used only for the left vertex set no explicit variables are used for the right vertex set the right vertex set is the interval (minValue .. maxValue)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class choco.kernel.solver.constraints.global.matching.AbstractBipartiteGraph |
---|
AbstractBipartiteGraph.IntQueue |
Field Summary |
---|
Fields inherited from class choco.kernel.solver.constraints.global.matching.AbstractBipartiteMatching |
---|
refInverseMatch |
Fields inherited from class choco.kernel.solver.constraints.global.matching.AbstractBipartiteGraph |
---|
component, componentOrder, currentComponent, currentNode, finishDate, left2rightArc, matchingSize, maxValue, minValue, nbLeftVertices, nbRightVertices, nbVertices, queue, refMatch, right2leftArc, seen, source, time |
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 | |
---|---|
AllDifferent(IntDomainVar[] vars,
IEnvironment environment)
API entry point: creating an ice alldifferent constraint (before posting it) |
|
AllDifferent(IntDomainVar[] vars,
int minValue,
int maxValue,
IEnvironment environment)
AllDiff constraint constructor |
Method Summary | |
---|---|
void |
awake()
no specific initial propagation (awake does the same job as propagate) |
void |
awakeOnInf(int idx)
update current matching when a domain inf is increased |
void |
awakeOnInst(int idx)
update current matching when a variable has been instantiated |
void |
awakeOnRem(int idx,
int val)
when a value is removed from a domain var, removed the corresponding edge in current matching |
void |
awakeOnSup(int idx)
update current matching when a domain sup is decreased |
Object |
clone()
Clone the constraint |
void |
deleteEdgeAndPublish(int i,
int j)
when an edge is definitely removed from the bipartite assignment graph. |
int |
getFilteredEventMask(int idx)
|
int |
getFineDegree(int idx)
Some global constraint might be able to provide some fine grained information about the "real" degree of a variables. |
protected void |
init()
|
boolean |
isSatisfied(int[] tuple)
Checks if the constraint is satisfied when all variables are instantiated. |
String |
pretty()
pretty printing of the object. |
void |
setEdgeAndPublish(int i,
int j)
when an edge is definitely chosen in the bipartite assignment graph. |
Methods inherited from class choco.kernel.solver.constraints.global.matching.AbstractBipartiteMatching |
---|
decreaseMatchingSize, deleteMatch, increaseMatchingSize, inverseMatch, mayDiminishFlowFromSource, mayGrowFlowFromSource, mustGrowFlowFromSource, putRefMatch, setMatch |
Methods inherited from class choco.kernel.solver.constraints.global.matching.AbstractBipartiteGraph |
---|
addComponentEdge, addComponentVertex, augment, augmentFlow, findAlternatingPath, firstDFSearch, firstPassDFS, getNbComponents, initSCCGraph, match, mayDiminishFlowBetween, mayGrowFlowBetween, mayGrowFlowToSink, mayInverseMatch, mayMatch, prettyPrintForDebug, propagate, refreshSCC, removeUselessEdges, secondDFSearch, secondPassDFS |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRemovals, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, 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 AllDifferent(IntDomainVar[] vars, IEnvironment environment)
vars
- environment
- public AllDifferent(IntDomainVar[] vars, int minValue, int maxValue, IEnvironment environment)
vars
- the choco variable listminValue
- minimal value in vars domainmaxValue
- maximal value in vars domainenvironment
- Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
protected void init()
init
in class AbstractBipartiteMatching
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractSConstraint<IntDomainVar>
CloneNotSupportedException
- Clone not supported exceptionpublic void setEdgeAndPublish(int i, int j) throws ContradictionException
i
- j
-
ContradictionException
public void deleteEdgeAndPublish(int i, int j) throws ContradictionException
deleteEdgeAndPublish
in class AbstractBipartiteGraph
i
- j
-
ContradictionException
public void awakeOnRem(int idx, int val)
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
idx
- the variable indexval
- the removed valuepublic void awakeOnInf(int idx)
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
idx
- the variable indexpublic void awakeOnSup(int idx)
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
idx
- the variable indexpublic void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
idx
- the variable index
ContradictionException
public void awake() throws ContradictionException
awake
in class Propagator
ContradictionException
public 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>
public int getFineDegree(int idx)
AbstractSConstraint
getFineDegree
in interface SConstraint<IntDomainVar>
getFineDegree
in class AbstractSConstraint<IntDomainVar>
idx
- index of the variable in the constraint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |