pub fn toposort(&mut self) -> Option<Vec<NodeIndex>> {
        if self.toposort_cache.is_none() {
            self.toposort_cache = algo::toposort(&self.graph, None).ok();
        }

        self.toposort_cache.clone()
    }
// Only for DAG(Directed Acyclic Graph) network
Only for DAG(Directed Acyclic Graph) network
Only for DAG ( Directed Acyclic Graph ) network
pub fn toposort(&mut self) -> Option<Vec<NodeIndex>> {
        if self.toposort_cache.is_none() {
            self.toposort_cache = algo::toposort(&self.graph, None).ok();
        }
        self.toposort_cache.clone()
    }
pub fn toposort ( & mut self ) -> Option < Vec < NodeIndex > > { if self . toposort_cache . is_none ( ) { self . toposort_cache = algo :: toposort ( & self . graph , None ) . ok ( ) ; } self . toposort_cache . clone ( ) }
Only for DAG(Directed Acyclic Graph) network
Only for DAG ( Directed Acyclic Graph ) network
&mut self