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

Functor wrapper for weighted blossom matching. More...

#include <Blossom_Weighted.H>

Public Member Functions

 Compute_Maximum_Weight_General_Matching (Weight weight=Weight(), SA sa=SA(), const bool max_cardinality=false)
 Construct the solver with specific options.
 
Blossom_Weighted_Result< long longoperator() (const GT &g, DynDlist< typename GT::Arc * > &matching)
 Compute maximum-weight matching.
 

Private Attributes

Weight weight_
 
SA sa_
 
bool max_cardinality_ = false
 

Detailed Description

template<class GT, class Weight = Dft_Dist<GT>, class SA = Dft_Show_Arc<GT>>
class Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >

Functor wrapper for weighted blossom matching.

Definition at line 395 of file Blossom_Weighted.H.

Constructor & Destructor Documentation

◆ Compute_Maximum_Weight_General_Matching()

template<class GT , class Weight = Dft_Dist<GT>, class SA = Dft_Show_Arc<GT>>
Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::Compute_Maximum_Weight_General_Matching ( Weight  weight = Weight(),
SA  sa = SA(),
const bool  max_cardinality = false 
)
inline

Construct the solver with specific options.

Parameters
[in]weightWeight accessor functor.
[in]saArc filter for graph traversal.
[in]max_cardinalityIf true, optimize lexicographically: maximum cardinality first, then maximum weight.

Definition at line 409 of file Blossom_Weighted.H.

Member Function Documentation

◆ operator()()

template<class GT , class Weight = Dft_Dist<GT>, class SA = Dft_Show_Arc<GT>>
Blossom_Weighted_Result< long long > Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::operator() ( const GT g,
DynDlist< typename GT::Arc * > &  matching 
)
inline

Compute maximum-weight matching.

Parameters
[in]gGraph (must be undirected).
[out]matchingOutput list where the selected matching arcs will be stored.
Returns
A Blossom_Weighted_Result structure containing the total weight and cardinality.
Exceptions
domain_errorIf `g` is a digraph.
overflow_errorIf weights exceed `long long` limits or the number of nodes exceeds the internal solver's limit.

Definition at line 431 of file Blossom_Weighted.H.

References Aleph::divide_and_conquer_partition_dp(), Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::max_cardinality_, Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::sa_, and Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::weight_.

Member Data Documentation

◆ max_cardinality_

template<class GT , class Weight = Dft_Dist<GT>, class SA = Dft_Show_Arc<GT>>
bool Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::max_cardinality_ = false
private

◆ sa_

template<class GT , class Weight = Dft_Dist<GT>, class SA = Dft_Show_Arc<GT>>
SA Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::sa_
private

◆ weight_

template<class GT , class Weight = Dft_Dist<GT>, class SA = Dft_Show_Arc<GT>>
Weight Aleph::Compute_Maximum_Weight_General_Matching< GT, Weight, SA >::weight_
private

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