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<V,E>, MatchingAlgorithm.MatchingImpl<V,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<V,E> |
getMatching()
Compute a matching for a given graph.
|
public 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<V,E> getMatching()
getMatching
in interface MatchingAlgorithm<V,E>
Copyright © 2019. All rights reserved.