Struct algorithm_rs::graph::euler_tour::EulerTour
source · 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 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