pub fn topological_sort(&self) -> Vec<usize> {
        let mut vertices = (0..self.graph.num_v()).collect::<Vec<_>>();
        vertices.sort_by_key(|&u| self.num_cc - self.cc[u]);
        vertices
    }
/// Gets the vertices of a directed acyclic graph (DAG) in topological order.
Gets the vertices of a directed acyclic graph (DAG) in topological order.
Gets the vertices of a directed acyclic graph ( DAG ) in topological order .
pub fn topological_sort(&self) -> Vec<usize> {
        let mut vertices = (0..self.graph.num_v()).collect::<Vec<_>>();
        vertices.sort_by_key(|&u| self.num_cc - self.cc[u]);
        vertices
    }
pub fn topological_sort ( & self ) -> Vec < usize > { let mut vertices = ( 0 .. self . graph . num_v ( ) ) . collect :: < Vec < _ > > ( ) ; vertices . sort_by_key ( | & u | self . num_cc - self . cc [ u ] ) ; vertices }
Gets the vertices of a directed acyclic graph (DAG) in topological order.
Gets the vertices of a directed acyclic graph ( DAG ) in topological order .
&self
&self