pub fn execute<G, W, E: Edge<W>>(mut self, graph: &G) -> Vec<Vec<usize>>
    where
        G: provide::Graph<W, E, UndirectedEdge> + provide::Vertices + provide::Neighbors,
    {
        let mut dfs = Dfs::init(graph, &mut self);

        dfs.execute(graph);

        self.ccs
    }
/// Finds connected components of an undirected graph.
///
/// # Arguments
/// `graph`: Graph to search for its connected components.
///
/// # Returns
/// Connected components of the graph. \
/// Returned value will be vector of vectors. Each vector contains ids of vertices that are in a component.
Finds connected components of an undirected graph.
Finds connected components of an undirected graph .
pub fn execute<G, W, E: Edge<W>>(mut self, graph: &G) -> Vec<Vec<usize>>
    where
        G: provide::Graph<W, E, UndirectedEdge> + provide::Vertices + provide::Neighbors,
    {
        let mut dfs = Dfs::init(graph, &mut self);
        dfs.execute(graph);
        self.ccs
    }
pub fn execute < G , W , E : Edge < W > > ( mut self , graph : & G ) -> Vec < Vec < usize > > where G : provide :: Graph < W , E , UndirectedEdge > + provide :: Vertices + provide :: Neighbors , { let mut dfs = Dfs :: init ( graph , & mut self ) ; dfs . execute ( graph ) ; self . ccs }
Finds connected components of an undirected graph.
Finds connected components of an undirected graph .
mut self
graph
&G
Connected components of the graph. \
Returned value will be vector of vectors. Each vector contains ids of vertices that are in a component.
Connected components of the graph . \ Returned value will be vector of vectors . Each vector contains ids of vertices that are in a component .
mut self
graph
&G