pub fn adj_list(&self) -> AdjList<'_> {
        let mut m: AdjList<'_> = HashMap::new();
        for node in &self.nodes {
            m.insert(&node.label, Vec::new());
        }
        for edge in &self.edges {
            m.entry(&edge.from).or_insert_with(Vec::new).push(&edge.to);
        }
        m
    }
/// Returns the adjacency list representation of the graph.
/// Adjacency list can be used to easily find the childern of a given node.
/// If the a node does not have any childern, then the list correspoding to that node
/// will be empty.
Returns the adjacency list representation of the graph.
Adjacency list can be used to easily find the childern of a given node.
If the a node does not have any childern, then the list correspoding to that node
will be empty.
Returns the adjacency list representation of the graph . Adjacency list can be used to easily find the childern of a given node . If the a node does not have any childern then the list correspoding to that node will be empty .
pub fn adj_list(&self) -> AdjList<'_> {
        let mut m: AdjList<'_> = HashMap::new();
        for node in &self.nodes {
            m.insert(&node.label, Vec::new());
        }
        for edge in &self.edges {
            m.entry(&edge.from).or_insert_with(Vec::new).push(&edge.to);
        }
        m
    }
pub fn adj_list ( & self ) -> AdjList < ' _ > { let mut m : AdjList < ' _ > = HashMap :: new ( ) ; for node in & self . nodes { m . insert ( & node . label , Vec :: new ( ) ) ; } for edge in & self . edges { m . entry ( & edge . from ) . or_insert_with ( Vec :: new ) . push ( & edge . to ) ; } m }
Returns the adjacency list representation of the graph.
Returns the adjacency list representation of the graph .
&self
&self