MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / test1

Function test1

code/graph/dinic.test.cpp:5–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3}
4
5void test1() {
6 int N = 20;
7 int MAX = 100000;
8
9 flow_network mf(N);
10 ek::flow_network mf2(N);
11
12 for(int i = 0; i < N; i++) {
13 for(int j = 0; j < N; j++) {
14 int cap = rng() % MAX + 1;
15 mf.add_edge(i, j, cap);
16 mf2.add_edge(i, j, cap);
17 }
18 }
19
20 for(int i = 0; i < N; ++i) {
21 for(int j = 0; j < N; ++j) {
22 if (i != j)
23 assert_equal(mf2.max_flow(i, j), mf.max_flow(i, j));
24 }
25 }
26}
27
28void test2() {
29 int N = 20;

Callers 1

testFunction · 0.70

Calls 3

assert_equalFunction · 0.50
add_edgeMethod · 0.45
max_flowMethod · 0.45

Tested by

no test coverage detected