pub struct CartesianTree {
pub root: usize,
pub parents: Vec<usize>,
pub children: Vec<[usize; 2]>,
}
Fields§
§root: usize
§parents: Vec<usize>
§children: Vec<[usize; 2]>
Implementations§
Source§impl CartesianTree
impl CartesianTree
Sourcepub fn new<T>(a: &[T]) -> Selfwhere
T: PartialOrd,
pub fn new<T>(a: &[T]) -> Selfwhere
T: PartialOrd,
pub fn with_ranges(&self, f: impl FnMut(usize, Range<usize>))
Trait Implementations§
Source§impl Clone for CartesianTree
impl Clone for CartesianTree
Source§fn clone(&self) -> CartesianTree
fn clone(&self) -> CartesianTree
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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