choco.global.matching
Class AbstractBipartiteMatching
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractLargeIntConstraint
choco.global.matching.AbstractBipartiteGraph
choco.global.matching.AbstractBipartiteMatching
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- AllDifferent
public abstract class AbstractBipartiteMatching
- extends AbstractBipartiteGraph
A subclass of AbtractBipartiteGraph restricted only to matchings (and not flows)
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 |
Method Summary |
java.lang.Object |
clone()
returns a copy of the constraint. |
void |
decreaseMatchingSize(int j)
matching size has been decrease by 1
TODO in AbtractBipartiteGraph in claire ice |
void |
deleteMatch(int i,
int j)
removing the arc i-j from the reference matching |
void |
increaseMatchingSize(int j)
Matching size has been increase by 1
TODO in AbtractBipartiteGraph in claire ice |
void |
initAbstractBipartiteMatching()
|
int |
inverseMatch(int j)
accessing the left vertex matched to j |
boolean |
mayDiminishFlowFromSource(int j)
whether the flow from the source to j (a right vertex) may be decreased |
boolean |
mayGrowFlowFromSource(int j)
whether the flow from the source to j (a right vertex) may be increased |
boolean |
mustGrowFlowFromSource(int j)
whether the flow from the source to j (a right vertex) must be increased in order to get a maximal
(sink/left vertex set saturating) flow |
void |
putRefMatch(int i,
int j)
adding the arc i-j in the reference matching without any updates |
void |
setMatch(int i,
int j)
adding the arc i-j in the reference matching |
Methods inherited from class choco.global.matching.AbstractBipartiteGraph |
addComponentEdge, addComponentVertex, augment, augmentFlow, deleteEdgeAndPublish, findAlternatingPath, firstDFSearch, firstPassDFS, getPriority, init, initSCCGraph, match, mayDiminishFlowBetween, mayGrowFlowBetween, mayGrowFlowToSink, mayInverseMatch, mayMatch, propagate, removeUselessEdges, secondDFSearch, secondPassDFS |
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
refInverseMatch
protected IStateIntVector refInverseMatch
AbstractBipartiteMatching
public AbstractBipartiteMatching(IntDomainVar[] vars,
int nbLeft,
int nbRight)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Description copied from interface:
Constraint
- returns a copy of the constraint. This copy is a new object, may be a recursive copy in case
of composite constraints. The original and the copy share the same variables & plugins
- Specified by:
clone
in interface Constraint
- Overrides:
clone
in class AbstractBipartiteGraph
- Returns:
-
- Throws:
java.lang.CloneNotSupportedException
initAbstractBipartiteMatching
public void initAbstractBipartiteMatching()
inverseMatch
public int inverseMatch(int j)
- accessing the left vertex matched to j
- Parameters:
j
-
- Returns:
- the left vertex matched to j
increaseMatchingSize
public void increaseMatchingSize(int j)
- Matching size has been increase by 1
TODO in AbtractBipartiteGraph in claire ice
- Specified by:
increaseMatchingSize
in class AbstractBipartiteGraph
- Parameters:
j
- useless
decreaseMatchingSize
public void decreaseMatchingSize(int j)
- matching size has been decrease by 1
TODO in AbtractBipartiteGraph in claire ice
- Specified by:
decreaseMatchingSize
in class AbstractBipartiteGraph
- Parameters:
j
- useless
deleteMatch
public void deleteMatch(int i,
int j)
- removing the arc i-j from the reference matching
- Specified by:
deleteMatch
in class AbstractBipartiteGraph
- Parameters:
i
- j
-
putRefMatch
public void putRefMatch(int i,
int j)
- adding the arc i-j in the reference matching without any updates
- Specified by:
putRefMatch
in class AbstractBipartiteGraph
- Parameters:
i
- j
-
setMatch
public void setMatch(int i,
int j)
- adding the arc i-j in the reference matching
- Specified by:
setMatch
in class AbstractBipartiteGraph
- Parameters:
i
- j
-
mayDiminishFlowFromSource
public boolean mayDiminishFlowFromSource(int j)
- Description copied from class:
AbstractBipartiteGraph
- whether the flow from the source to j (a right vertex) may be decreased
- Specified by:
mayDiminishFlowFromSource
in class AbstractBipartiteGraph
- Parameters:
j
-
- Returns:
- whether the flow from the source to j (a right vertex) may be decreased
mayGrowFlowFromSource
public boolean mayGrowFlowFromSource(int j)
- Description copied from class:
AbstractBipartiteGraph
- whether the flow from the source to j (a right vertex) may be increased
- Specified by:
mayGrowFlowFromSource
in class AbstractBipartiteGraph
- Parameters:
j
-
- Returns:
- whether the flow from the source to j (a right vertex) may be increased
mustGrowFlowFromSource
public boolean mustGrowFlowFromSource(int j)
- Description copied from class:
AbstractBipartiteGraph
- whether the flow from the source to j (a right vertex) must be increased in order to get a maximal
(sink/left vertex set saturating) flow
- Specified by:
mustGrowFlowFromSource
in class AbstractBipartiteGraph
- Parameters:
j
-
- Returns:
- whether the flow from the source to j (a right vertex) must be increased in order to get a maximal
(sink/left vertex set saturating) flow