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

Function test_10

code/graph/scc.test.cpp:159–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void test_10() {
160 vvi adj(4);
161
162 adj[0].push_back(1);
163 adj[1].push_back(0);
164 adj[2].push_back(1);
165 adj[2].push_back(3);
166 adj[3].push_back(2);
167
168 pair<union_find, vi> res = scc(adj);
169 union_find scc = res.first;
170 vi dag = res.second;
171
172 assert_equal(scc.find(0), scc.find(1));
173 assert_equal(scc.find(2), scc.find(3));
174 assert_not_equal(scc.find(0), scc.find(2));
175
176 assert_equal(scc.find(0), scc.find(dag[0]));
177 assert_equal(scc.find(2), scc.find(dag[1]));
178}
179
180void test_11() {
181 vvi adj(10);

Callers 1

testFunction · 0.85

Calls 5

sccFunction · 0.85
assert_not_equalFunction · 0.85
push_backMethod · 0.80
assert_equalFunction · 0.50
findMethod · 0.45

Tested by

no test coverage detected