6#include <gtest/gtest.h>
35 auto arc = it.get_curr();
39 if (src ==
nullptr || tgt ==
nullptr)
121 Net* net =
gen(4, 10, 0.5);
133 Net* net =
gen(3, 8, 0.2, 50.0, 0.5);
145 Net* net =
gen(4, 6, 0.2, 100, 0.9, 0.5, 0.05);
160 const unsigned seed = 12345;
206 Net* net =
gen(5, 8, 0.2, 100, 0.9, 0.4, 0.1);
214 auto arc = it.get_curr();
233 Net* net =
gen(3, 10, 0.2, 100.0, 0.5);
240 auto arc = it.get_curr();
241 double cap = arc->cap;
257 for (
int i = 2; i <= 10; ++i)
327 Net* net =
gen(4, 10, 0.2, 100, 0.9, 0.8, 0.05);
339 Net* net =
gen(4, 10, 0.2, 100, 0.9, 0.1, 0.01);
350 Net* net =
gen(4, 10, 0.2, 100, 0.9, 0.5, 0.3);
389 std::vector<std::pair<size_t, size_t>>
configs = {
390 {2, 5}, {3, 10}, {5, 15}, {10, 20}
void next()
Advances the iterator to the next filtered element.
Node * get_src_node(Arc *arc) const noexcept
Return the source node of arc (only for directed graphs)
constexpr size_t get_num_nodes() const noexcept
Return the total of nodes of graph.
constexpr size_t get_num_arcs() const noexcept
Node * get_tgt_node(Arc *arc) const noexcept
Return the target node of arc (only for directed graphs)
bool is_valid_network(Net *net)
DynArray< Graph::Node * > nodes
Main namespace for Aleph-w library functions.
Array< size_t > ranks(const Array< T > &array)
Computes the rank of each element in an Array.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Random network flow graph generation.
TEST_F(RandomNetworkTest, GenerateMinimalNetwork)
Filtered iterator on all the arcs of a graph.
Arc of a flow network implemented with adjacency lists.
Flow network implemented with adjacency lists.
Network flow graph structures.