ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
Matching.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*---------------------------- File Matching.h -----------------------------*/
3/*--------------------------------------------------------------------------*/
60/*--------------------------------------------------------------------------*/
61/*----------------------------- DEFINITIONS --------------------------------*/
62/*--------------------------------------------------------------------------*/
63
64#ifndef __ADS_Matching
65 #define __ADS_Matching
66/* self-identification: #endif constant */
67
68/*--------------------------------------------------------------------------*/
69/*------------------------------ INCLUDES ----------------------------------*/
70/*--------------------------------------------------------------------------*/
71
72#include "ADS/Contract.h"
73#include "ADS/graph/Graph.h"
74#include "ADS/graph/MaxFlow.h"
75#include "ADS/graph/Visit.h"
76
77#include <algorithm>
78#include <cstddef>
79#include <tuple>
80#include <type_traits>
81#include <utility>
82#include <vector>
83
84/*--------------------------------------------------------------------------*/
85/*--------------------------- NAMESPACE ------------------------------------*/
86/*--------------------------------------------------------------------------*/
87
88namespace ADS
89{
90
91/*--------------------------------------------------------------------------*/
92/*------------------------------- FUNCTIONS --------------------------------*/
93/*--------------------------------------------------------------------------*/
94
122inline std::vector< std::pair< int , int > >
123bipartiteBMatching( const std::vector< std::vector< int > > & A , int nr ,
124 const std::vector< long long > & capL ,
125 const std::vector< long long > & capR );
126
158template< class W >
159std::pair< W , std::vector< std::size_t > >
161 const std::vector< std::tuple< int , int , W > > & E );
162
163/*--------------------------------------------------------------------------*/
164
165} // end( namespace ADS )
166
167/*--------------------------------------------------------------------------*/
168/*-------------------------- IMPLEMENTATION --------------------------------*/
169/*--------------------------------------------------------------------------*/
170
171#include "ADS/graph/impl/Matching.tpp"
172
173/*--------------------------------------------------------------------------*/
174/*------------------------ THE MATCHINGS OF EDMONDS ------------------------*/
175/*--------------------------------------------------------------------------*/
176
178
179/*--------------------------------------------------------------------------*/
180
181#endif /* Matching.h included */
182
183/*--------------------------------------------------------------------------*/
184/*-------------------------- End File Matching.h ---------------------------*/
185/*--------------------------------------------------------------------------*/
The matchings of a general graph by the blossoms of Edmonds, beyond the book, whose matchings of a bi...
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The maximum flow of section 15.2 in a network , with integer capacities, and the minimum cut.
The visits of a GRAPH of section 9.5 and their applications, each in time on lists or vectors of adj...
The GRAPH of chapter 9 and its realizations.
std::pair< W, std::vector< std::size_t > > branchAndBoundMatching(int n, const std::vector< std::tuple< int, int, W > > &E)
the largest total weight of a matching of the graph of nodes and of the edges by a branch and bound...
std::vector< std::pair< int, int > > bipartiteBMatching(const std::vector< std::vector< int > > &A, int nr, const std::vector< long long > &capL, const std::vector< long long > &capR)
the pairs of a -matching of largest size, the nodes on the right adjacent to the node on the left,...
Definition ADT.h:96