V - the graph vertex typeE - the graph edge typepublic class KuhnMunkresMinimalWeightBipartitePerfectMatching<V,E> extends Object implements MatchingAlgorithm<V,E>
Assignment problem could be set as follows:
Given complete bipartite graph G = (S, T; E), such that |S| = |T|, and each edge has non-negative cost c(i, j), find perfect matching of minimal cost.
MatchingAlgorithm.Matching<E>, MatchingAlgorithm.MatchingImpl<E>DEFAULT_EPSILON| Constructor and Description |
|---|
KuhnMunkresMinimalWeightBipartitePerfectMatching(Graph<V,E> graph,
Set<? extends V> partition1,
Set<? extends V> partition2)
Construct a new instance of the algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
MatchingAlgorithm.Matching<E> |
computeMatching()
Compute a matching for a given graph.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMatchingpublic KuhnMunkresMinimalWeightBipartitePerfectMatching(Graph<V,E> graph, Set<? extends V> partition1, Set<? extends V> partition2)
graph - the input graphpartition1 - the first partition of the vertex setpartition2 - the second partition of the vertex setpublic MatchingAlgorithm.Matching<E> computeMatching()
computeMatching in interface MatchingAlgorithm<V,E>Copyright © 2017. All rights reserved.