|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Network flow utilities: generators, visualization, serialization. More...
#include <fstream>#include <sstream>#include <random>#include <chrono>#include <iomanip>#include <tpl_net.H>#include <tpl_netcost.H>#include <tpl_dynMapTree.H>Go to the source code of this file.
Classes | |
| struct | Aleph::NetworkGenParams |
| Parameters for random network generation. More... | |
| struct | Aleph::DotExportOptions |
| Options for DOT export. More... | |
| struct | Aleph::MaxFlowBenchmarkResult< Flow_Type > |
| Result of running a max-flow algorithm. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Functions | |
| template<class Net > | |
| Net | Aleph::generate_random_network (const NetworkGenParams ¶ms) |
| Generate a random flow network. | |
| template<class Net > | |
| Net | Aleph::generate_random_network (size_t num_nodes, size_t num_arcs, double min_cap=1.0, double max_cap=100.0, unsigned seed=0) |
| Generate a random flow network (convenience overload). | |
| template<class Net > | |
| Net | Aleph::generate_grid_network (size_t rows, size_t cols, typename Net::Flow_Type capacity, bool bidirectional=true) |
| Generate a grid network. | |
| template<class Net > | |
| Net | Aleph::generate_bipartite_network (size_t left_size, size_t right_size, double edge_prob=0.5, unsigned seed=0) |
| Generate a bipartite network for matching. | |
| template<class Net > | |
| Net | Aleph::generate_layered_network (const std::vector< size_t > &layer_sizes, typename Net::Flow_Type capacity, double edge_prob=0.5, unsigned seed=0) |
| Generate a layered network. | |
| template<class Net > | |
| void | Aleph::export_network_to_dot (const Net &net, const std::string &filename, const DotExportOptions &options=DotExportOptions()) |
| Export network to DOT format for GraphViz visualization. | |
| template<class Net > | |
| std::string | Aleph::network_to_dot_string (const Net &net, const DotExportOptions &options=DotExportOptions()) |
| Generate DOT string for network (instead of file). | |
| template<class Net > | |
| void | Aleph::export_network_to_json (const Net &net, const std::string &filename) |
| Export network to JSON format. | |
| template<class Net > | |
| std::string | Aleph::network_to_json_string (const Net &net) |
| Export network to JSON string. | |
| template<class Net > | |
| void | Aleph::export_network_to_dimacs (const Net &net, const std::string &filename) |
| Export network to DIMACS max-flow format. | |
| template<class Net > | |
| Net | Aleph::import_network_from_dimacs (const std::string &filename) |
| Import network from DIMACS max-flow format. | |
| template<class Net , class Algo > | |
| MaxFlowBenchmarkResult< typename Net::Flow_Type > | Aleph::benchmark_maxflow (Net &net, Algo algo, const std::string &name) |
| Run and time a max-flow algorithm. | |
| template<typename Flow_Type > | |
| void | Aleph::print_benchmark_results (const std::vector< MaxFlowBenchmarkResult< Flow_Type > > &results) |
| Print benchmark results. | |
Network flow utilities: generators, visualization, serialization.
This file provides utility functions for working with network flow graphs:
Definition in file net_utils.H.