Skip to content

Commit 9cd3887

Browse files
committed
renaming to hagerup
1 parent a95cc79 commit 9cd3887

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

library/trees/uncommon/linear_kth_par.hpp renamed to library/trees/uncommon/hagerup_kth_par.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
//! https://codeforces.com/blog/entry/126580
33
//! @code
44
//! vector<basic_string<int>> g(n);
5-
//! linear_kth_par kp(g);
5+
//! hagerup kp(g);
66
//! kp.kth_par(v, k); // k edges up from v
77
//! kp.kth_par(v, 1); // v's parent
88
//! @endcode
99
//! @time O(n*max((2*K+3)/K,2*K) + q)
1010
//! @space O(n*max((2*K+3)/K,2*K))
11-
template<int K = 2> struct linear_kth_par {
11+
template<int K = 2> struct hagerup {
1212
int n;
1313
vi d, leaf, pos, jmp;
1414
vector<vi> lad;
15-
linear_kth_par(const auto& g):
15+
hagerup(const auto& g):
1616
n(sz(g)), d(n), leaf(n), pos(n), jmp(2 * n), lad(n) {
1717
static_assert(K >= 1);
1818
int t = 1;

tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"https://judge.yosupo.jp/problem/jump_on_tree"
33
#include "../template.hpp"
44
#include "../../../library/trees/linear_lca.hpp"
5-
#include "../../../library/trees/uncommon/linear_kth_par.hpp"
5+
#include "../../../library/trees/uncommon/hagerup_kth_par.hpp"
66
#include "../../../library/trees/lca_rmq.hpp"
77
#include "../compress_tree_asserts.hpp"
88
int main() {
@@ -17,10 +17,10 @@ int main() {
1717
adj[v].push_back(u);
1818
}
1919
linear_lca lin_lca(adj);
20-
linear_kth_par<1> lin_kp_1(adj);
21-
linear_kth_par<2> lin_kp_2(adj);
22-
linear_kth_par<3> lin_kp_3(adj);
23-
linear_kth_par<4> lin_kp_4(adj);
20+
hagerup<1> lin_kp_1(adj);
21+
hagerup<2> lin_kp_2(adj);
22+
hagerup<3> lin_kp_3(adj);
23+
hagerup<4> lin_kp_4(adj);
2424
LCA lc(adj);
2525
compress_tree_asserts(adj, lc);
2626
auto get_kth_par = [&](int v, int k) -> int {

0 commit comments

Comments
 (0)