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の端点
Implementations§
Auto Trait Implementations§
impl Freeze for HLD
impl RefUnwindSafe for HLD
impl Send for HLD
impl Sync for HLD
impl Unpin for HLD
impl UnwindSafe for HLD
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more