Module org.jgrapht.core
Package org.jgrapht.alg.matching
Class SparseEdmondsMaximumCardinalityMatching.Algorithm<V,E>
- java.lang.Object
-
- org.jgrapht.alg.matching.SparseEdmondsMaximumCardinalityMatching.Algorithm<V,E>
-
- Type Parameters:
V- the vertex typeE- the edge type
- Enclosing class:
- SparseEdmondsMaximumCardinalityMatching<V,E>
private static class SparseEdmondsMaximumCardinalityMatching.Algorithm<V,E> extends java.lang.ObjectThe actual implementation as an inner class. We use this pattern in order to free the work memory after computation. The outer class can cache the result but can also release all the auxiliary memory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSparseEdmondsMaximumCardinalityMatching.Algorithm.LabelEven, odd and unlabeled labels.
-
Field Summary
Fields Modifier and Type Field Description private SparseEdmondsMaximumCardinalityMatching.VertexPartitionbaseprivate Graph<V,E>graphprivate MatchingAlgorithm<V,E>initializerprivate SparseEdmondsMaximumCardinalityMatching.Algorithm.Label[]labelprivate java.util.List<java.lang.Integer>labeledNodesprivate int[]mateprivate intnodesprivate static intNULLprivate double[]path1private double[]path2private int[]predprivate FixedSizeIntegerQueuequeueprivate int[]sourceBridge(package private) doublestrueprivate int[]targetBridgeprivate java.util.Map<V,java.lang.Integer>vertexIndexMapprivate V[]vertexMap
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<E>computeMatching()java.util.Map<V,java.lang.Integer>computeOddSetCover()private voidfindPath(java.util.Deque<java.lang.Integer> p, int x, int y)private voidinitialize()private voidrunInitializer()private voidshrinkPath(int b, int v, int w)
-
-
-
Field Detail
-
NULL
private static final int NULL
- See Also:
- Constant Field Values
-
initializer
private MatchingAlgorithm<V,E> initializer
-
nodes
private int nodes
-
vertexIndexMap
private java.util.Map<V,java.lang.Integer> vertexIndexMap
-
vertexMap
private V[] vertexMap
-
mate
private int[] mate
-
label
private SparseEdmondsMaximumCardinalityMatching.Algorithm.Label[] label
-
pred
private int[] pred
-
strue
double strue
-
path1
private double[] path1
-
path2
private double[] path2
-
sourceBridge
private int[] sourceBridge
-
targetBridge
private int[] targetBridge
-
base
private SparseEdmondsMaximumCardinalityMatching.VertexPartition base
-
queue
private FixedSizeIntegerQueue queue
-
labeledNodes
private java.util.List<java.lang.Integer> labeledNodes
-
-
Method Detail
-
initialize
private void initialize()
-
runInitializer
private void runInitializer()
-
findPath
private void findPath(java.util.Deque<java.lang.Integer> p, int x, int y)
-
shrinkPath
private void shrinkPath(int b, int v, int w)
-
computeMatching
public java.util.Set<E> computeMatching()
-
computeOddSetCover
public java.util.Map<V,java.lang.Integer> computeOddSetCover()
-
-