V- the graph vertex type
E- the graph edge type
public class HopcroftKarpBipartiteMatching<V,E> extends Object implements MatchingAlgorithm<V,E>
|Constructor and Description|
Create a new instance of the Hopcroft-Karp algorithm for the computation of maximum matchings in bipartite graphs.
|Modifier and Type||Method and Description|
Returns set of edges making up the matching
public HopcroftKarpBipartiteMatching(UndirectedGraph<V,E> graph, Set<V> partition1, Set<V> partition2)
graph- the input graph
partition1- vertex set of one of the partitions of the bipartite graph
partition2- vertex set of the other partition of the bipartite graph
public Set<E> getMatching()
Copyright © 2016. All rights reserved.