|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractLargeIntConstraint
choco.global.matching.AbstractBipartiteGraph
choco.global.matching.AbstractBipartiteFlow
choco.global.matching.GlobalCardinality
public class GlobalCardinality
very simple version of the cardinality constraint where the values the set of values whose occurrences are counted in the interval (minValue .. maxValue)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class choco.global.matching.AbstractBipartiteGraph |
|---|
AbstractBipartiteGraph.IntQueue |
| Field Summary |
|---|
| Fields inherited from class choco.global.matching.AbstractBipartiteFlow |
|---|
compatibleFlow, flow, maxFlow, minFlow |
| Fields inherited from class choco.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.integer.constraints.AbstractLargeIntConstraint |
|---|
cIndices, cste, vars |
| Fields inherited from class choco.AbstractConstraint |
|---|
active, constAwakeEvent, hook, priority |
| Fields inherited from class choco.AbstractEntity |
|---|
problem |
| Constructor Summary | |
|---|---|
GlobalCardinality(IntDomainVar[] vars,
int[] low,
int[] up)
Constructor, Global cardinality constraint API, short cut when smallest value equals 0 note : maxVal - minVal + 1 = low.length = up.length |
|
GlobalCardinality(IntDomainVar[] vars,
int minValue,
int maxValue,
int[] low,
int[] up)
Constructor, Global cardinality constraint API note : maxVal - minVal + 1 = valueMinOccurence.length = valueMaxOccurence.length |
|
| Method Summary | |
|---|---|
void |
awake()
performing the initial propagation, reduce variables domain to the candidate assign values |
void |
awakeOnInf(int idx)
update the reference matching before redoing the strongly connected components analysis when removing value in the domain of variable idx |
void |
awakeOnInst(int idx)
update the reference matching before redoing the strongly connected components analysis when idx is instantiated |
void |
awakeOnRem(int idx,
int x)
Implement reaction to edge removal |
void |
awakeOnSup(int idx)
update the reference matching before redoing the strongly connected components analysis when removing value in the domain of variable idx |
void |
awakeOnVar(int idx)
Needs to be defined to update the reference matching before redoing the strongly connected components analysis. |
java.lang.Object |
clone()
returns a copy of the constraint. |
void |
deleteEdgeAndPublish(int i,
int j)
implement one of the two main events: when an edge is definitely removed from the bipartite assignment graph |
boolean |
isSatisfied()
TODO : not implemented |
java.lang.String |
pretty()
pretty printing of the object. |
void |
setEdgeAndPublish(int i,
int j)
implement the other main event: when an edge is definitely set in the bipartite assignment graph |
| Methods inherited from class choco.global.matching.AbstractBipartiteFlow |
|---|
augment, decreaseMatchingSize, deleteMatch, findAlternatingPath, increaseMatchingSize, initAbstractBipartiteFlow, mayDiminishFlowFromSource, mayGrowFlowFromSource, mustGrowFlowFromSource, putRefMatch, setMatch |
| Methods inherited from class choco.global.matching.AbstractBipartiteGraph |
|---|
addComponentEdge, addComponentVertex, augmentFlow, firstDFSearch, firstPassDFS, getPriority, init, initSCCGraph, match, mayDiminishFlowBetween, mayGrowFlowBetween, mayGrowFlowToSink, mayInverseMatch, mayMatch, propagate, removeUselessEdges, secondDFSearch, secondPassDFS |
| Methods inherited from class choco.integer.constraints.AbstractLargeIntConstraint |
|---|
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, setConstraintIndex, setVar |
| Methods inherited from class choco.integer.constraints.AbstractIntConstraint |
|---|
awakeOnBounds, awakeOnRemovals, getSelfIndex, isConsistent |
| Methods inherited from class choco.AbstractConstraint |
|---|
addListener, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface choco.integer.IntConstraint |
|---|
awakeOnBounds, awakeOnRemovals, getIntVar |
| Methods inherited from interface choco.Propagator |
|---|
assignIndices, constAwake, delete, getEvent, getPlugIn, getPriority, isCompletelyInstantiated, isConsistent, isEntailed, propagate |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
addListener, isActive, setActive, setPassive |
| Methods inherited from interface choco.integer.var.IntVarEventListener |
|---|
getConstraintIdx, setConstraintIndex |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
addListener, isActive, setActive, setPassive |
| Constructor Detail |
|---|
public GlobalCardinality(IntDomainVar[] vars,
int minValue,
int maxValue,
int[] low,
int[] up)
vars - the variable listminValue - smallest value that could be assigned to variablemaxValue - greatest value that could be assigned to variablelow - minimum for each valueup - maximum occurences for each value
public GlobalCardinality(IntDomainVar[] vars,
int[] low,
int[] up)
vars - the variable listlow - minimum for each valueup - maximum occurences for each value| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Constraint
clone in interface Constraintclone in class AbstractBipartiteFlowjava.lang.CloneNotSupportedException
public void deleteEdgeAndPublish(int i,
int j)
throws ContradictionException
deleteEdgeAndPublish in class AbstractBipartiteGraphi - the variable to unmatchj - the value to remove
ContradictionException - if the removal generates a contradiction
public void setEdgeAndPublish(int i,
int j)
throws ContradictionException
i - the variable to assignj - the assignement value
ContradictionException
public void awakeOnRem(int idx,
int x)
throws ContradictionException
awakeOnRem in interface IntVarEventListenerawakeOnRem in class AbstractIntConstraintidx - variable indexx - value to remove
ContradictionExceptionpublic void awakeOnVar(int idx)
awakeOnVar in interface VarEventListenerawakeOnVar in interface PropagatorawakeOnVar in class AbstractConstraintidx - variable index
public void awakeOnInf(int idx)
throws ContradictionException
awakeOnInf in interface IntVarEventListenerawakeOnInf in class AbstractIntConstraintidx - variable index
ContradictionException
public void awakeOnSup(int idx)
throws ContradictionException
awakeOnSup in interface IntVarEventListenerawakeOnSup in class AbstractIntConstraintidx - variable index
ContradictionExceptionpublic void awakeOnInst(int idx)
awakeOnInst in interface IntVarEventListenerawakeOnInst in class AbstractIntConstraintidx - variable index
public void awake()
throws ContradictionException
awake in interface Propagatorawake in class AbstractConstraintContradictionExceptionpublic boolean isSatisfied()
isSatisfied in interface Constraintpublic java.lang.String pretty()
Entity
pretty in interface Entitypretty in class AbstractEntity
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||