V- the graph vertex type
E- the graph edge type
public 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.
|Constructor and Description|
Construct a new instance of the algorithm.
|Modifier and Type||Method and Description|
Compute a matching for a given graph.
public KuhnMunkresMinimalWeightBipartitePerfectMatching(Graph<V,E> graph, Set<? extends V> partition1, Set<? extends V> partition2)
graph- the input graph
partition1- the first partition of the vertex set
partition2- the second partition of the vertex set
Copyright © 2019. All rights reserved.