pub struct CartesianTree {
pub root: usize,
pub parent: Vec<Option<usize>>,
pub left: Vec<Option<usize>>,
pub right: Vec<Option<usize>>,
}
Expand description
CartesianTree
Fields§
§root: usize
Cartesian treeの根
parent: Vec<Option<usize>>
親の頂点
left: Vec<Option<usize>>
右の子の頂点
right: Vec<Option<usize>>
左の子の頂点
Implementations§
Source§impl CartesianTree
impl CartesianTree
Sourcepub fn new<T>(a: &[T]) -> Selfwhere
T: PartialOrd,
pub fn new<T>(a: &[T]) -> Selfwhere
T: PartialOrd,
distinctな配列a
からCartesianTree
を構築する。
Auto Trait Implementations§
impl Freeze for CartesianTree
impl RefUnwindSafe for CartesianTree
impl Send for CartesianTree
impl Sync for CartesianTree
impl Unpin for CartesianTree
impl UnwindSafe for CartesianTree
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