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