Function ADS::bipartiteMatching

Function Documentation

inline std::vector<std::pair<int, int>> ADS::bipartiteMatching(int p, int q, const std::vector<std::pair<int, int>> &E)

the pairs ( i , j ) of a largest matching of the bipartite graph with p left and q right nodes and the edges E ( i , j ), by a maximum flow

Pre:

p, q >= 0 and the edges join [ 0 , p ) to [ 0 , q )

Post:

no two pairs returned share an end