Skip to content

Commit e473ecc

Browse files
committed
add another example
1 parent b44b453 commit e473ecc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

library/graphs/bridges_cuts/bcc_callback.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@
2727
//! bridge_tree[uf.find(i)] += uf.find(v);
2828
//! }
2929
//!
30+
//! {
31+
//! // ********* IF NO MULTIPLE EDGES *********
32+
//! vector<vi> adj(n);
33+
//! vector<int> cc_id(n);
34+
//! bcc_callback(adj, [&](const vi& nodes) {
35+
//! if (ssize(nodes) == 2) {
36+
//! // nodes[0] <=> nodes[1] is a bridge
37+
//! return;
38+
//! }
39+
//! for (int v : nodes) cc_id[v] = nodes.back();
40+
//! });
41+
//! }
42+
//!
3043
//! vector<basic_string<int>> adj(n);
3144
//! vector<basic_string<int>> block_vertex_tree(2 * n);
3245
//! int bcc_id = n;

0 commit comments

Comments
 (0)