Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
blossom_example.cc File Reference

General graph maximum matching with Edmonds-Blossom. More...

#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include <utility>
#include <tpl_array.H>
#include <tpl_dynSetTree.H>
#include <Blossom.H>
#include <tpl_graph.H>
#include <tpl_sgraph.H>
#include <tpl_agraph.H>
Include dependency graph for blossom_example.cc:

Go to the source code of this file.

Functions

int main ()
 Program entry that runs two Edmonds–Blossom example scenarios and emits TikZ visualizations.
 

Detailed Description

General graph maximum matching with Edmonds-Blossom.

Demonstrates:

  • Maximum cardinality matching in non-bipartite graphs
  • Same algorithm over three Aleph graph backends
  • TikZ export with highlighted matching arcs

Build and run:

cmake -S . -B build cmake –build build –target blossom_example ./build/Examples/blossom_example

Generated files:

  • /tmp/blossom_pentagon_stems.tex
  • /tmp/blossom_double_flower.tex

Definition in file blossom_example.cc.

Function Documentation

◆ main()

int main ( )

Program entry that runs two Edmonds–Blossom example scenarios and emits TikZ visualizations.

Executes two predefined Scenario instances (pentagon_stems and double_flower), prints per-backend matching results to stdout, writes corresponding TikZ files to /tmp, and prints instructions to convert those TeX files to PDF.

Returns
int Exit code: 0 on success.

Definition at line 357 of file blossom_example.cc.

References Aleph::divide_and_conquer_partition_dp().