Skip to content

Commit e476c37

Browse files
authored
Golf init (#132)
* golf the docs * switch this too
1 parent aa9c377 commit e476c37

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

library/trees/centroid_decomp.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
//! @code
33
//! {
44
//! vector<vi> adj(n);
5-
//! centroid(adj, [&](const vector<vi>& adj,
5+
//! centroid(adj, [&](const auto& adj,
66
//! int cent, int par_cent) {
77
//! });
88
//! }
99
//! vector<basic_string<int>> adj(n);
10-
//! centroid(adj,
11-
//! [&](const vector<basic_string<int>>& adj,
10+
//! centroid(adj, [&](const auto& adj,
1211
//! int cent, int par_cent) {});
1312
//! @endcode
1413
//! @time O(n log n)

library/trees/edge_cd.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66
//! @code
77
//! {
88
//! vector<vi> adj(n);
9-
//! edge_cd(adj, [&](const vector<vi>& adj,
10-
//! int cent, int split) {});
9+
//! edge_cd(adj, [&](const auto& adj,
10+
//! int cent, int m) {});
1111
//! }
1212
//! vector<basic_string<int>> adj(n);
13-
//! edge_cd(adj, [&](const vector<basic_string<int>>&
14-
//! adj, int cent, int split) {
15-
//! // subtrees of prefix [0, split) of adj[cent]
16-
//! // are the first edge-set
17-
//! // subtrees of suffix [split, sz(adj[cent]))
18-
//! // of adj[cent] are the second edge-set
13+
//! edge_cd(adj, [&](const auto& adj, int cent, int m) {
14+
//! // subtrees of [0, m) of adj[cent]: 1st edge-set
15+
//! // subtrees of [m, sz(adj[cent])): 2nd edge-set
1916
//! });
2017
//! @endcode
2118
//! handle single-edge-paths separately

0 commit comments

Comments
 (0)