Struct cp_library_rs::graph::hld::HLD
source · pub struct HLD {
pub N: usize,
pub root: usize,
pub G: Vec<Vec<usize>>,
pub parent: Vec<usize>,
pub subtree_size: Vec<usize>,
pub in_: Vec<usize>,
pub out: Vec<usize>,
pub head: Vec<usize>,
}
Expand description
HL分解
Fields§
§N: usize
頂点数
root: usize
根
G: Vec<Vec<usize>>
グラフ
parent: Vec<usize>
親頂点
subtree_size: Vec<usize>
subtree_size[i] := i
を根とする部分木のサイズ
in_: Vec<usize>
行きがけ順での番号
out: Vec<usize>
帰りがけ順での番号
head: Vec<usize>
heavy pathの端点