Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Compute_Maximum_Cardinality_Bipartite_Matching< GT, Max_Flow, SA > Class Template Reference

Class for computing the maximum cardinality matching of a bipartite graph. More...

#include <tpl_bipartite.H>

Public Member Functions

 Compute_Maximum_Cardinality_Bipartite_Matching (SA __sa=SA())
 Builds the computation with the filter of the arcs.
 
void operator() (const GT &g, DynDlist< typename GT::Arc * > &matching)
 Computes the maximum bipartite matching of a graph.
 

Private Attributes

SA sa
 

Detailed Description

template<AlephGraph GT, template< class > class Max_Flow = Ford_Fulkerson_Maximum_Flow, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
class Aleph::Compute_Maximum_Cardinality_Bipartite_Matching< GT, Max_Flow, SA >

Class for computing the maximum cardinality matching of a bipartite graph.

The class handles two type parameters:

  1. GT the bipartite graph type
  2. Max_Flow the maximum flow algorithm to use for the computation. By default, the Ford-Fulkerson algorithm is used.

Definition at line 333 of file tpl_bipartite.H.

Constructor & Destructor Documentation

◆ Compute_Maximum_Cardinality_Bipartite_Matching()

template<AlephGraph GT, template< class > class Max_Flow = Ford_Fulkerson_Maximum_Flow, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
Aleph::Compute_Maximum_Cardinality_Bipartite_Matching< GT, Max_Flow, SA >::Compute_Maximum_Cardinality_Bipartite_Matching ( SA  __sa = SA())
inlineexplicit

Builds the computation with the filter of the arcs.

Parameters
[in]__sathe filter of the arcs, which each iterator copies.

Definition at line 342 of file tpl_bipartite.H.

Member Function Documentation

◆ operator()()

template<AlephGraph GT, template< class > class Max_Flow = Ford_Fulkerson_Maximum_Flow, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
void Aleph::Compute_Maximum_Cardinality_Bipartite_Matching< GT, Max_Flow, SA >::operator() ( const GT &  g,
DynDlist< typename GT::Arc * > &  matching 
)
inline

Computes the maximum bipartite matching of a graph.

compute_maximum_cardinality_bipartite_matching(g,matching) takes a bipartite graph g and computes the maximum bipartite matching in the list matching.

The procedure computes the bipartition sets, then constructs an equivalent unit-capacity flow network, and invokes a maximum flow algorithm on it.

Parameters
[in]gthe bipartite graph.
[out]matchinglist of arcs that form the matching.
Exceptions
bad_allocif there is not enough memory.

Definition at line 359 of file tpl_bipartite.H.

References Aleph::Compute_Maximum_Cardinality_Bipartite_Matching< GT, Max_Flow, SA >::sa.

Member Data Documentation

◆ sa

template<AlephGraph GT, template< class > class Max_Flow = Ford_Fulkerson_Maximum_Flow, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
SA Aleph::Compute_Maximum_Cardinality_Bipartite_Matching< GT, Max_Flow, SA >::sa
private

The documentation for this class was generated from the following file: