N1
- The first node typeN2
- The second node typepublic class MaxWeightMatching<N1,N2> extends java.lang.Object
This class is not thread save!
Modifier and Type | Class and Description |
---|---|
static interface |
MaxWeightMatching.IWeightProvider<N1,N2>
A class providing the weight for a connection between two nodes.
|
Constructor and Description |
---|
MaxWeightMatching() |
Modifier and Type | Method and Description |
---|---|
double |
calculateMatching(java.util.List<N1> nodes1,
java.util.List<N2> nodes2,
MaxWeightMatching.IWeightProvider<N1,N2> weightProvider,
PairList<N1,N2> matching)
Calculate the weighted bipartite matching.
|
public MaxWeightMatching()
public double calculateMatching(java.util.List<N1> nodes1, java.util.List<N2> nodes2, MaxWeightMatching.IWeightProvider<N1,N2> weightProvider, PairList<N1,N2> matching)
matching
- if this is non null
, the matching (i.e. the pairs
of nodes matched onto each other) will be put into it.