|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Educational examples for minimum cut algorithms. More...
#include <iostream>#include <iomanip>#include <string>#include <vector>#include <cmath>#include <limits>#include <Karger_Stein.H>#include <Stoer_Wagner.H>#include <tpl_graph.H>Go to the source code of this file.
Functions | |
| template<typename GT > | |
| void | print_partition (const string &name, const DynList< typename GT::Node * > &partition) |
| template<typename GT > | |
| void | print_cut_edges (GT &g, const DynList< typename GT::Arc * > &cut) |
| void | example_network_reliability () |
| void | example_weighted_bandwidth () |
| void | example_community_detection () |
| void | example_algorithm_comparison () |
| void | example_api_patterns () |
| void | example_algorithm_selection () |
| int | main () |
Educational examples for minimum cut algorithms.
This file provides comprehensive, well-documented examples of using the Karger-Stein and Stoer-Wagner min-cut algorithms in Aleph-w.
A minimum cut (min-cut) of a graph is a partition of vertices into two non-empty sets S and T such that the total weight of edges crossing between S and T is minimized.
Key Properties:
g++ -std=c++20 -O2 -I.. -o min_cut_example min_cut_example.cc \ -lgsl -lgslcblas -lpthread ./min_cut_example
Definition in file min_cut_example.cc.
| void example_algorithm_comparison | ( | ) |
| void example_algorithm_selection | ( | ) |
Definition at line 498 of file min_cut_example.cc.
References Aleph::maps().
| void example_api_patterns | ( | ) |
Definition at line 402 of file min_cut_example.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and Aleph::maps().
| void example_community_detection | ( | ) |
Definition at line 242 of file min_cut_example.cc.
References Aleph::maps().
| void example_network_reliability | ( | ) |
Definition at line 103 of file min_cut_example.cc.
References Aleph::maps(), and Aleph::min_cut().
| void example_weighted_bandwidth | ( | ) |
Definition at line 177 of file min_cut_example.cc.
References Aleph::maps().
| int main | ( | ) |
Definition at line 560 of file min_cut_example.cc.
Definition at line 85 of file min_cut_example.cc.
References GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), and Aleph::maps().
| void print_partition | ( | const string & | name, |
| const DynList< typename GT::Node * > & | partition | ||
| ) |
Definition at line 67 of file min_cut_example.cc.
References Aleph::maps(), and Aleph::partition().