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

#include <Blossom.H>

Collaboration diagram for Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >:
[legend]

Public Types

using Node = typename GT::Node
 
using Arc = typename GT::Arc
 

Public Member Functions

 Edmonds_Blossom_Matcher (const GT &graph, SA __sa=SA())
 Initialize the matcher with a graph and an optional filter.
 
size_t solve ()
 Execute the matching algorithm.
 
const Array< long > & get_match_vector () const noexcept
 Returns the match vector (mate of each node index).
 
Arcget_pair_arc (size_t u, size_t v) const noexcept
 Returns the arc connecting node indices u and v.
 

Private Types

using Pair_Key = std::pair< size_t, size_t >
 

Private Member Functions

void build_node_index ()
 Index nodes from 0 to n-1 and set up the cookie-based mapping.
 
void build_adjacency ()
 Build a simplified adjacency list for faster traversal.
 
size_t lca (size_t a, size_t b) const
 Find the lowest common ancestor of two nodes in the alternating tree.
 
void mark_path (size_t v, const size_t blossom_base, size_t child)
 Mark the path from v to the blossom base and set up parents.
 
void clear_queue ()
 
long find_augmenting_path (const size_t root)
 Search for an augmenting path starting from root.
 
void augment_matching (const long endpoint)
 Augment the matching along the path ending at endpoint.
 

Static Private Member Functions

static Pair_Key normalized_pair (size_t u, size_t v) noexcept
 

Private Attributes

const GTg
 
SA sa
 
Cookie_Saver< GTcookie_saver
 
Array< Node * > nodes
 
Array< Array< size_t > > adjacency
 
DynMapTree< Pair_Key, Arc * > pair_to_arc
 
Array< longmatch
 
Array< longparent
 
Array< longbase
 
Array< charin_queue
 
Array< charin_blossom
 
DynListQueue< size_t > bfs_queue
 

Static Private Attributes

static constexpr long No_Vertex = -1
 

Detailed Description

template<class GT, class SA>
class Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >

Definition at line 99 of file Blossom.H.

Member Typedef Documentation

◆ Arc

◆ Node

◆ Pair_Key

template<class GT , class SA >
using Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >::Pair_Key = std::pair<size_t, size_t>
private

Definition at line 106 of file Blossom.H.

Constructor & Destructor Documentation

◆ Edmonds_Blossom_Matcher()

Member Function Documentation

◆ augment_matching()

◆ build_adjacency()

◆ build_node_index()

◆ clear_queue()

◆ find_augmenting_path()

◆ get_match_vector()

template<class GT , class SA >
const Array< long > & Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >::get_match_vector ( ) const
inlinenoexcept

Returns the match vector (mate of each node index).

Definition at line 390 of file Blossom.H.

References Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >::match.

◆ get_pair_arc()

template<class GT , class SA >
Arc * Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >::get_pair_arc ( size_t  u,
size_t  v 
) const
inlinenoexcept

◆ lca()

◆ mark_path()

◆ normalized_pair()

◆ solve()

Member Data Documentation

◆ adjacency

◆ base

◆ bfs_queue

◆ cookie_saver

Definition at line 112 of file Blossom.H.

◆ g

◆ in_blossom

◆ in_queue

◆ match

◆ No_Vertex

◆ nodes

◆ pair_to_arc

◆ parent

◆ sa


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