V - the graph vertex typeE - the graph edge typepublic class MaximumWeightBipartiteMatching<V,E> extends Object implements WeightedMatchingAlgorithm<V,E>
| Constructor and Description |
|---|
MaximumWeightBipartiteMatching(WeightedGraph<V,E> graph,
Set<V> vertexPartition1,
Set<V> vertexPartition2)
Creates a new MaximumWeightBipartiteMatching algorithm instance.
|
| Modifier and Type | Method and Description |
|---|---|
Set<E> |
getMatching()
Returns set of edges making up the matching
|
double |
getMatchingWeight()
Returns weight of a matching found
|
public MaximumWeightBipartiteMatching(WeightedGraph<V,E> graph, Set<V> vertexPartition1, Set<V> vertexPartition2)
graph - simple undirected weighted bipartite graph to find matching in, with positive
integer edge weightsvertexPartition1 - first vertex partition of the bipartite graph, disjoint from
vertexPartition2vertexPartition2 - second vertex partition of the bipartite graph, disjoint from
vertexPartition1public Set<E> getMatching()
MatchingAlgorithmgetMatching in interface MatchingAlgorithm<V,E>public double getMatchingWeight()
WeightedMatchingAlgorithmgetMatchingWeight in interface WeightedMatchingAlgorithm<V,E>Copyright © 2016. All rights reserved.