|
ADS
Algorithms and Data Structures
|
Matchings, the sets of edges of a graph no two of which share an end beyond the capacities of the ends: More...
#include "ADS/Contract.h"#include "ADS/graph/Graph.h"#include "ADS/graph/MaxFlow.h"#include "ADS/graph/Visit.h"#include <algorithm>#include <cstddef>#include <tuple>#include <type_traits>#include <utility>#include <vector>#include "ADS/graph/impl/Matching.tpp"#include "ADS/graph/BlossomMatching.h"Go to the source code of this file.
Namespaces | |
| namespace | ADS |
Functions | |
| std::vector< std::pair< int, int > > | ADS::bipartiteBMatching (const std::vector< std::vector< int > > &A, int nr, const std::vector< long long > &capL, const std::vector< long long > &capR) |
| the pairs \( ( u , v ) \) of a \( b \)-matching of largest size, \( A[ u ] \) the nodes on the right adjacent to the node \( u \) on the left, \( u \) in at most \( \mathit{capL}[ u ] \) pairs and \( v \) in at most \( \mathit{capR}[ v ] \) | |
| template<class W> | |
| std::pair< W, std::vector< std::size_t > > | ADS::branchAndBoundMatching (int n, const std::vector< std::tuple< int, int, W > > &E) |
| the largest total weight of a matching of the graph of \( n \) nodes and of the edges \( E = ( u , v , w ) \) by a branch and bound, and the places in \( E \) of its edges, in increasing order | |
Matchings, the sets of edges of a graph no two of which share an end beyond the capacities of the ends:
The matchings of largest size and of largest weight of a general graph, maxCardinalityMatching() and maxWeightMatching() by the blossoms of Edmonds (beyond the book), are in BlossomMatching.h, which this header includes, so that an include of either gives all the matchings.
The contracts [see Contract.h]: the nodes on the right of the edges are in [ 0 , nr ), the capacities are not negative, an edge joins two distinct nodes of the graph; at the level of the audits the matchings given respect the capacities of the ends. The functions are defined in Matching.tpp.