|
|||||||||
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
public abstract class AbstractBipartiteFlow
A general assignment constraint with constraints on the flow bounds
Nested Class Summary |
---|
Nested classes/interfaces inherited from class choco.global.matching.AbstractBipartiteGraph |
---|
AbstractBipartiteGraph.IntQueue |
Field Summary | |
---|---|
protected boolean |
compatibleFlow
|
protected IStateIntVector |
flow
|
protected int[] |
maxFlow
|
protected int[] |
minFlow
|
Fields inherited from class choco.global.matching.AbstractBipartiteGraph |
---|
component, componentOrder, currentComponent, currentNode, finishDate, left2rightArc, logger, 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 | |
---|---|
AbstractBipartiteFlow(IntDomainVar[] vars,
int nbLeft,
int nbRight)
Constructor for AbstractBipartiteFlow |
Method Summary | |
---|---|
void |
augment(int x)
Augment flow on the current matching |
java.lang.Object |
clone()
returns a copy of the constraint. |
void |
decreaseMatchingSize(int j)
updates the matching size when the matching is rebuilt |
void |
deleteMatch(int i,
int j)
remove the assignment of j to the ith variable |
int |
findAlternatingPath()
Search for an augmenting path |
void |
increaseMatchingSize(int j)
updates the matching size when one more left vertex is matched with j |
protected void |
initAbstractBipartiteFlow()
|
boolean |
mayDiminishFlowFromSource(int j)
check unassignement |
boolean |
mayGrowFlowFromSource(int j)
check assignement |
boolean |
mustGrowFlowFromSource(int j)
check if j should be assigned to other variables |
void |
putRefMatch(int i,
int j)
Assignment of j to the ith variable |
void |
setMatch(int i,
int j)
match the ith variable to value j |
Methods inherited from class choco.global.matching.AbstractBipartiteGraph |
---|
addComponentEdge, addComponentVertex, augmentFlow, deleteEdgeAndPublish, 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, awakeOnInf, awakeOnInst, awakeOnRem, awakeOnRemovals, awakeOnSup, getSelfIndex, isConsistent |
Methods inherited from class choco.AbstractConstraint |
---|
addListener, awake, awakeOnVar, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class choco.AbstractEntity |
---|
pretty |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.Propagator |
---|
awake, awakeOnVar, constAwake, delete, getEvent, getPlugIn, isEntailed |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Field Detail |
---|
protected int[] minFlow
protected int[] maxFlow
protected IStateIntVector flow
protected boolean compatibleFlow
Constructor Detail |
---|
public AbstractBipartiteFlow(IntDomainVar[] vars, int nbLeft, int nbRight)
vars
- nbLeft domain variablesnbLeft
- number of domain variables to assignnbRight
- number of values for assignmentMethod Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Constraint
clone
in interface Constraint
clone
in class AbstractBipartiteGraph
java.lang.CloneNotSupportedException
protected void initAbstractBipartiteFlow()
public void setMatch(int i, int j)
setMatch
in class AbstractBipartiteGraph
i
- the variable to matchj
- the value to assignpublic void deleteMatch(int i, int j)
deleteMatch
in class AbstractBipartiteGraph
i
- the variable to unmatchj
- the value to removepublic void putRefMatch(int i, int j)
putRefMatch
in class AbstractBipartiteGraph
i
- the variable to assignj
- the valuepublic boolean mayDiminishFlowFromSource(int j)
mayDiminishFlowFromSource
in class AbstractBipartiteGraph
j
- the jth value
public boolean mayGrowFlowFromSource(int j)
mayGrowFlowFromSource
in class AbstractBipartiteGraph
j
- the jth value
public boolean mustGrowFlowFromSource(int j)
mustGrowFlowFromSource
in class AbstractBipartiteGraph
j
- the jth value
public void increaseMatchingSize(int j)
increaseMatchingSize
in class AbstractBipartiteGraph
j
- indice of the assigned valuepublic void decreaseMatchingSize(int j)
decreaseMatchingSize
in class AbstractBipartiteGraph
j
- indice of the removed assignementpublic int findAlternatingPath()
findAlternatingPath
in class AbstractBipartiteGraph
public void augment(int x)
augment
in class AbstractBipartiteGraph
x
- left extremity of one of the matching arc
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |