Program Listing for File Matching.h
↰ Return to documentation for file (ADS/graph/Matching.h)
/*--------------------------------------------------------------------------*/
/*---------------------------- File Matching.h -----------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_Matching
#define __ADS_Matching
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include "ADS/graph/MaxFlow.h"
#include <algorithm>
#include <cstddef>
#include <tuple>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
/*--------------------------------------------------------------------------*/
/*------------------------------- FUNCTIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
inline 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 );
template< class W >
std::pair< W , std::vector< std::size_t > > maxWeightMatching( int n ,
const std::vector< std::tuple< int , int , W > > & E );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/graph/impl/Matching.tpp"
/*--------------------------------------------------------------------------*/
#endif /* Matching.h included */
/*--------------------------------------------------------------------------*/
/*-------------------------- End File Matching.h ---------------------------*/
/*--------------------------------------------------------------------------*/