6#include <gtest/gtest.h>
295 for (
int i = 0; i < 10; ++i)
297 config.
seed = 1000 + i;
358 for (
double density = 0.1; density <= 0.9; density += 0.2)
421 std::invalid_argument);
427 ::testing::InitGoogleTest(&
argc,
argv);
Complete bipartite network generator.
Erdős–Rényi random network generator.
Layered (staged) network generator.
constexpr size_t vsize() const noexcept
size_t esize() const noexcept
Return the total of arcs of graph.
Main namespace for Aleph-w library functions.
Net::Flow_Type edmonds_karp_maximum_flow(Net &net)
Maximize flow using the Edmonds-Karp algorithm.
size_t size(Node *root) noexcept
Net::Flow_Type dinic_maximum_flow(Net &net)
Compute maximum flow using Dinic's algorithm.
Net::Flow_Type capacity_scaling_maximum_flow(Net &net)
Compute maximum flow using capacity scaling.
Net::Flow_Type hlpp_maximum_flow(Net &net)
Compute maximum flow using Highest-Label Preflow-Push.
std::pair< typename Net::Flow_Type, typename Net::Flow_Type > successive_shortest_paths(Net &net)
Compute minimum cost maximum flow using Successive Shortest Paths.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Random network generators for testing flow algorithms.
Arc of a flow network implemented with adjacency lists.
Arc type for maximum flow minimum cost networks.
Capacitated flow network with costs associated to arcs.
Flow network implemented with adjacency lists.
void make_super_source()
Convert a multi-source network into a single super-source network.
void make_super_sink()
Convert a multi-sink network into a single super-sink network.
constexpr bool is_single_source() const noexcept
Return true if the network has a single source.
constexpr bool is_single_sink() const noexcept
Return true if the network has a single sink.
Random network generator configuration.
size_t num_nodes
Number of nodes.
bool ensure_connected
Ensure source can reach sink.
double min_cost
Minimum arc cost (for cost networks)
double max_cost
Maximum arc cost.
double min_capacity
Minimum arc capacity.
unsigned seed
Random seed (0 = time-based)
double density
Edge density [0, 1] (for Erdős–Rényi)
double max_capacity
Maximum arc capacity.
Advanced maximum flow algorithms.
Advanced minimum cost flow algorithms.
Network flow graph structures.
Maximum flow minimum cost network algorithms.