V
- the graph vertex typeE
- the graph edge typepublic class HopcroftKarpBipartiteMatching<V,E> extends Object implements MatchingAlgorithm<V,E>
MatchingAlgorithm.Matching<E>, MatchingAlgorithm.MatchingImpl<E>
DEFAULT_EPSILON
Constructor and Description |
---|
HopcroftKarpBipartiteMatching(Graph<V,E> graph,
Set<V> partition1,
Set<V> partition2)
Construct a new instance of the Hopcroft-Karp algorithm for the computation of maximum
matchings in bipartite graphs.
|
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, wait
getMatching
public HopcroftKarpBipartiteMatching(Graph<V,E> graph, Set<V> partition1, Set<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.