Template Function ADS::maxWeightMatching

Function Documentation

template<class W>
std::pair<W, std::vector<std::size_t>> ADS::maxWeightMatching(int n, const std::vector<std::tuple<int, int, W>> &E)

maxWeightMatching(): the largest total weight of a matching of the graph of n nodes and of the edges E = ( u , v , w ), and the places in E of its edges, in increasing order

Pre:

n >= 0, each edge joins two distinct nodes in [ 0 , n )

Post:

no two edges given have an end in common (audit)