pub fn euler_path(&self, u: usize) -> Vec<usize> {
        let mut adj_iters = (0..self.num_v())
            .map(|u| self.adj_list(u))
            .collect::<Vec<_>>();
        let mut edges = Vec::with_capacity(self.num_e());
        self.euler_recurse(u, &mut adj_iters, &mut edges);
        edges.reverse();
        edges
    }
/// Finds the sequence of edges in an Euler path starting from u, assuming it
/// exists and that the graph is directed. To extend this to undirected
/// graphs, keep track of a visited array to skip the reverse edge.
Finds the sequence of edges in an Euler path starting from u, assuming it
exists and that the graph is directed. To extend this to undirected
graphs, keep track of a visited array to skip the reverse edge.
Finds the sequence of edges in an Euler path starting from u assuming it exists and that the graph is directed . To extend this to undirected graphs keep track of a visited array to skip the reverse edge .
pub fn euler_path(&self, u: usize) -> Vec<usize> {
        let mut adj_iters = (0..self.num_v())
            .map(|u| self.adj_list(u))
            .collect::<Vec<_>>();
        let mut edges = Vec::with_capacity(self.num_e());
        self.euler_recurse(u, &mut adj_iters, &mut edges);
        edges.reverse();
        edges
    }
pub fn euler_path ( & self , u : usize ) -> Vec < usize > { let mut adj_iters = ( 0 .. self . num_v ( ) ) . map ( | u | self . adj_list ( u ) ) . collect :: < Vec < _ > > ( ) ; let mut edges = Vec :: with_capacity ( self . num_e ( ) ) ; self . euler_recurse ( u , & mut adj_iters , & mut edges ) ; edges . reverse ( ) ; edges }
Finds the sequence of edges in an Euler path starting from u, assuming it
exists and that the graph is directed.
Finds the sequence of edges in an Euler path starting from u assuming it exists and that the graph is directed .
&self
u
usize
&self
u
usize