Skip to content

Commit 215a7fb

Browse files
docs: align doc variable names with code (#253)
* docs: align doc variable names with code Doc comments referenced le/ri while the actual parameters and loop variables are named l/r. Also fix the functional graph doc to name the returned childs member, correct the find_substr comment, and reformat the cart_k_ary_tree example block. * [auto-verifier] verify commit 28b17cf --------- Co-authored-by: GitHub <noreply@github.com>
1 parent b9d7aed commit 215a7fb

8 files changed

Lines changed: 38 additions & 39 deletions

File tree

.verify-helper/timestamps.remote.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"tests/library_checker_aizu_tests/data_structures/persistent_seg_tree.test.cpp": "2026-07-07 10:02:09 -0700",
3636
"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_sliding_window.test.cpp": "2026-07-06 13:10:16 -0700",
3737
"tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2026-07-06 13:10:16 -0700",
38-
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-07-12 12:50:20 -0700",
38+
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-08-17 17:35:30 -0700",
3939
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2026-07-09 23:01:31 -0500",
4040
"tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2026-07-10 20:39:22 -0700",
4141
"tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2026-07-10 20:39:22 -0700",
@@ -74,11 +74,11 @@
7474
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-07-19 15:46:31 -0700",
7575
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-07-19 15:46:31 -0700",
7676
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-07-07 12:06:00 -0700",
77-
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-07-19 15:46:31 -0700",
77+
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-08-17 17:35:30 -0700",
7878
"tests/library_checker_aizu_tests/handmade_tests/dsu.test.cpp": "2026-07-07 12:06:00 -0700",
7979
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-07-19 15:46:31 -0700",
8080
"tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2026-07-07 12:06:00 -0700",
81-
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2026-07-07 12:06:00 -0700",
81+
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2026-08-17 17:35:30 -0700",
8282
"tests/library_checker_aizu_tests/handmade_tests/hilbert_mos.test.cpp": "2026-07-10 20:39:22 -0700",
8383
"tests/library_checker_aizu_tests/handmade_tests/kd_bit.test.cpp": "2026-07-07 12:06:00 -0700",
8484
"tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-07-10 20:39:22 -0700",
@@ -89,13 +89,13 @@
8989
"tests/library_checker_aizu_tests/handmade_tests/n_choose_k.test.cpp": "2026-07-07 12:06:00 -0700",
9090
"tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp": "2026-07-12 12:50:20 -0700",
9191
"tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp": "2026-07-12 12:50:20 -0700",
92-
"tests/library_checker_aizu_tests/handmade_tests/sa_find_subarray.test.cpp": "2026-07-12 12:50:20 -0700",
92+
"tests/library_checker_aizu_tests/handmade_tests/sa_find_subarray.test.cpp": "2026-08-17 17:35:30 -0700",
9393
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp": "2026-07-12 12:50:20 -0700",
9494
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find_small.test.cpp": "2026-07-07 12:06:00 -0700",
9595
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_midpoint.test.cpp": "2026-07-07 09:17:02 -0700",
9696
"tests/library_checker_aizu_tests/handmade_tests/xor_basis_walk.test.cpp": "2026-07-07 12:06:00 -0700",
9797
"tests/library_checker_aizu_tests/loops/chooses.test.cpp": "2026-07-06 13:10:16 -0700",
98-
"tests/library_checker_aizu_tests/loops/quotients.test.cpp": "2026-07-06 13:10:16 -0700",
98+
"tests/library_checker_aizu_tests/loops/quotients.test.cpp": "2026-08-17 17:35:30 -0700",
9999
"tests/library_checker_aizu_tests/loops/submasks.test.cpp": "2026-07-08 09:28:48 -0700",
100100
"tests/library_checker_aizu_tests/loops/supermasks.test.cpp": "2026-07-06 13:10:16 -0700",
101101
"tests/library_checker_aizu_tests/math/binary_matrix_mult.test.cpp": "2026-07-06 13:10:16 -0700",
@@ -111,24 +111,24 @@
111111
"tests/library_checker_aizu_tests/math/tetration.test.cpp": "2026-07-10 20:39:22 -0700",
112112
"tests/library_checker_aizu_tests/math/totient.test.cpp": "2024-11-17 14:04:03 -0600",
113113
"tests/library_checker_aizu_tests/math/xor_basis_intersection.test.cpp": "2026-07-07 12:06:00 -0700",
114-
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_binary_tree.test.cpp": "2026-07-07 12:06:00 -0700",
115-
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_k_ary_tree.test.cpp": "2026-07-12 12:50:20 -0700",
116-
"tests/library_checker_aizu_tests/monotonic_stack_related/count_rectangles.test.cpp": "2026-07-12 12:50:20 -0700",
117-
"tests/library_checker_aizu_tests/monotonic_stack_related/max_rect_histogram.test.cpp": "2026-07-12 12:50:20 -0700",
114+
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_binary_tree.test.cpp": "2026-08-17 17:35:30 -0700",
115+
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_k_ary_tree.test.cpp": "2026-08-17 17:35:30 -0700",
116+
"tests/library_checker_aizu_tests/monotonic_stack_related/count_rectangles.test.cpp": "2026-08-17 17:35:30 -0700",
117+
"tests/library_checker_aizu_tests/monotonic_stack_related/max_rect_histogram.test.cpp": "2026-08-17 17:35:30 -0700",
118118
"tests/library_checker_aizu_tests/strings/kmp.test.cpp": "2026-07-08 09:28:48 -0700",
119119
"tests/library_checker_aizu_tests/strings/lcp_array.test.cpp": "2026-07-12 12:50:20 -0700",
120-
"tests/library_checker_aizu_tests/strings/lcp_query_palindrome.test.cpp": "2026-07-12 12:50:20 -0700",
121-
"tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp": "2026-07-12 12:50:20 -0700",
120+
"tests/library_checker_aizu_tests/strings/lcp_query_palindrome.test.cpp": "2026-08-17 17:35:30 -0700",
121+
"tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp": "2026-08-17 17:35:30 -0700",
122122
"tests/library_checker_aizu_tests/strings/lcs_dp.test.cpp": "2026-07-19 15:32:29 -0700",
123123
"tests/library_checker_aizu_tests/strings/lcs_queries.test.cpp": "2026-07-19 15:32:29 -0700",
124124
"tests/library_checker_aizu_tests/strings/lcs_queries_merge_sort_tree.test.cpp": "2026-07-19 15:32:29 -0700",
125125
"tests/library_checker_aizu_tests/strings/manacher.test.cpp": "2026-07-19 15:32:29 -0700",
126-
"tests/library_checker_aizu_tests/strings/multi_matching_bs.test.cpp": "2026-07-12 12:50:20 -0700",
126+
"tests/library_checker_aizu_tests/strings/multi_matching_bs.test.cpp": "2026-08-17 17:35:30 -0700",
127127
"tests/library_checker_aizu_tests/strings/prefix_function.test.cpp": "2026-07-06 13:10:16 -0700",
128-
"tests/library_checker_aizu_tests/strings/sa_cmp.test.cpp": "2026-07-12 12:50:20 -0700",
129-
"tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp": "2026-07-19 15:32:29 -0700",
130-
"tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp": "2026-07-12 12:50:20 -0700",
131-
"tests/library_checker_aizu_tests/strings/suffix_array.test.cpp": "2026-07-12 12:50:20 -0700",
128+
"tests/library_checker_aizu_tests/strings/sa_cmp.test.cpp": "2026-08-17 17:35:30 -0700",
129+
"tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp": "2026-08-17 17:35:30 -0700",
130+
"tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp": "2026-08-17 17:35:30 -0700",
131+
"tests/library_checker_aizu_tests/strings/suffix_array.test.cpp": "2026-08-17 17:35:30 -0700",
132132
"tests/library_checker_aizu_tests/strings/suffix_array_short.test.cpp": "2026-07-12 12:50:20 -0700",
133133
"tests/library_checker_aizu_tests/strings/trie.test.cpp": "2026-07-06 13:10:16 -0700",
134134
"tests/library_checker_aizu_tests/strings/wildcard_pattern_matching.test.cpp": "2026-07-07 12:06:00 -0700",
@@ -142,12 +142,12 @@
142142
"tests/library_checker_aizu_tests/trees/hld_lib_checker_path.test.cpp": "2026-07-10 20:39:22 -0700",
143143
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_edges.test.cpp": "2026-07-10 20:39:22 -0700",
144144
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_nodes.test.cpp": "2026-07-10 20:39:22 -0700",
145-
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-07-12 12:50:20 -0700",
145+
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-08-17 17:35:30 -0700",
146146
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-07-09 23:01:31 -0500",
147147
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-07-10 20:39:22 -0700",
148-
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-07-12 12:50:20 -0700",
149-
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-07-12 12:50:20 -0700",
150-
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-07-12 12:50:20 -0700",
148+
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-08-17 17:35:30 -0700",
149+
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-08-17 17:35:30 -0700",
150+
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-08-17 17:35:30 -0700",
151151
"tests/library_checker_aizu_tests/trees/shallowest_aizu_tree_height.test.cpp": "2026-07-19 15:46:31 -0700",
152152
"tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp": "2026-07-19 15:46:31 -0700",
153153
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2026-07-19 15:46:31 -0700"

library/graphs/uncommon/functional_graph_processor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! bool is_on_cycle = (v == root);
99
//! @endcode
1010
//! root = first reachable node on cycle from v
11-
//! t[v].childs = forest of reversed edges not in cycles
11+
//! childs = forest of reversed edges not in cycles
1212
//! @time O(n)
1313
//! @space O(n)
1414
auto func_graph(const vi& a) {

library/loops/quotients.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#pragma once
22
//! https://github.com/tfg50/Competitive-Programming/blob/master/Biblioteca/Math/DivisionTrick.cpp
3-
//! i-th iteration gives an interval [le_i, ri_i]:
4-
//! - for all i in [le_i, ri_i]: n / i is the same
5-
//! - le_0 = 1
6-
//! - ri_last = n
7-
//! - ri_i + 1 = le_(i+1)
3+
//! i-th iteration gives an interval [l_i, r_i]:
4+
//! - for all i in [l_i, r_i]: n / i is the same
5+
//! - l_0 = 1
6+
//! - r_last = n
7+
//! - r_i + 1 = l_(i+1)
88
//! @time O(sqrt(n))
99
//! @space O(1)
1010
for (ll l = 1, r; l <= n && (r = n / (n / l)); l = r + 1)

library/monotonic_stack/cartesian_binary_tree.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include "monotonic_stack.hpp"
33
//! @code
44
//! // right-most min is root
5-
//! auto le = mono_st(a, less());
6-
//! auto p = cart_binary_tree(le);
5+
//! auto l = mono_st(a, less());
6+
//! auto p = cart_binary_tree(l);
77
//!
88
//! // less_equal() -> left-most min is root
99
//! // greater() -> right-most max is root

library/monotonic_stack/cartesian_k_ary_tree.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
//! p[5] = 9
2121
//!
2222
//! @code
23-
//! auto le = mono_st(a, less()), p =
24-
//! cart_k_ary_tree(a, le); // min cart tree auto le =
25-
//! mono_st(a, greater()), p = cart_k_ary_tree(a, le);
26-
//! // max cart tree bool is_node = (p[i] < i || a[i]
27-
//! != a[p[i]]);
23+
//! auto l = mono_st(a, less()); // min cart tree
24+
//! auto l = mono_st(a, greater()); // max cart tree
25+
//! auto p = cart_k_ary_tree(a, l);
26+
//! bool is_node = (p[i] < i || a[i] != a[p[i]]);
2827
//! @endcode
2928
//!
3029
//! @param a,l array and its left-monotonic stack

library/monotonic_stack/monotonic_range.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#pragma once
22
#include "monotonic_stack.hpp"
33
//! @code
4-
//! vector<int> le = mono_st(a, less()),
5-
//! ri = mono_range(le);
4+
//! vector<int> l = mono_st(a, less()),
5+
//! r = mono_range(l);
66
//! // less_equal(), greater(), greater_equal()
77
//! @endcode
88
//! when cmp == less():
9-
//! a[le[i]] < a[i] >= a[ri[i]]
9+
//! a[l[i]] < a[i] >= a[r[i]]
1010
//! @time O(n)
1111
//! @space O(n)
1212
vi mono_range(const vi& l) {

library/monotonic_stack/monotonic_stack.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#pragma once
22
//! @code
3-
//! vector<int> le = mono_st(a, less());
3+
//! vector<int> l = mono_st(a, less());
44
//! // less_equal(), greater(), greater_equal()
55
//! @endcode
66
//! when cmp == less():
7-
//! a[le[i]] < a[i]
7+
//! a[l[i]] < a[i]
88
//! @time O(n)
99
//! @space O(n)
1010
vi mono_st(const auto& a, const auto& cmp) {

library/strings/suffix_array/find/find_substring.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! requires s_l < n
99
//! for all i in [sa_le,sa_ri): s.substr(s_l,s_r-s_l)
1010
//! == s.substr(sa[i],s_r-s_l)
11-
//! - `r-l` is the # of matches of
11+
//! - `sa_ri-sa_le` is the # of matches of
1212
//! s.substr(s_l, s_r - s_l) in s.
1313
//! @time O(log(|s|))
1414
//! @space O(1)

0 commit comments

Comments
 (0)