pub struct EulerTour { /* private fields */ }Implementations§
Source§impl EulerTour
impl EulerTour
pub fn new(n: usize, graph: Graph) -> Self
Sourcepub fn traverse(&mut self, root: usize) -> (&[usize], &[usize])
pub fn traverse(&mut self, root: usize) -> (&[usize], &[usize])
Euler tour entrypoint that returns two vectors (&l, &r).
Note that timestamp starts from 1.
l: vector indicates the timestamp that visits a nodeuat the first time.r: vector indicates the timestamp that visits a nodeuat the last time.
Auto Trait Implementations§
impl Freeze for EulerTour
impl RefUnwindSafe for EulerTour
impl Send for EulerTour
impl Sync for EulerTour
impl Unpin for EulerTour
impl UnwindSafe for EulerTour
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