43#include <gtest/gtest.h>
45#if defined(_MSC_VER) && !defined(__clang__)
47# pragma warning(disable : 4996)
49# pragma GCC diagnostic push
50# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
54#if defined(_MSC_VER) && !defined(__clang__)
57# pragma GCC diagnostic pop
69TEST(FloatFlowTest, AFloatFlowStillWorksWhileDeprecated)
71 for (
int algo = 0; algo < 3; ++algo)
74 auto s = net.insert_node(0);
75 auto a = net.insert_node(1);
76 auto t = net.insert_node(2);
77 net.insert_arc(s, a, 3.0f);
78 net.insert_arc(a, t, 2.0f);
79 net.insert_arc(s, t, 1.5f);
83 EXPECT_EQ(
value, 3.5f) <<
"algorithm " << algo;
84 EXPECT_TRUE(net.check_network()) <<
"algorithm " << algo;
88int main(
int argc,
char **argv)
90 ::testing::InitGoogleTest(&argc, argv);
91 return RUN_ALL_TESTS();
size_t size_t int32_t value
Main namespace for Aleph-w library functions.
Net::Flow_Type edmonds_karp_maximum_flow(Net &net)
Maximize flow using the Edmonds-Karp algorithm.
Net::Flow_Type dinic_maximum_flow(Net &net)
Compute maximum flow using Dinic's algorithm.
Net::Flow_Type ford_fulkerson_maximum_flow(Net &net)
Maximize flow using the Ford-Fulkerson algorithm.
Arc of a flow network implemented with adjacency lists.
Flow network implemented with adjacency lists.
Advanced maximum flow algorithms.
Network flow graph structures.