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

Function test2

code/graph/dinic.test.cpp:28–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void test2() {
29 int N = 20;
30 int MAX = 100000;
31
32 flow_network mf(N);
33 ek::flow_network mf2(N);
34
35 for(int i = 0; i < N; i++) {
36 for(int j = 0; j < N; j++) {
37 int cap = rng() % MAX + 1;
38 mf.add_edge(i, j, cap, cap);
39 mf2.add_edge(i, j, cap, cap);
40 }
41 }
42
43 for(int i = 0; i < N; ++i) {
44 for(int j = 0; j < N; ++j) {
45 if (i != j)
46 assert_equal(mf2.max_flow(i, j), mf.max_flow(i, j));
47 }
48 }
49}
50
51void test3() {
52 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