Skip to main content

reverse_graph

Function reverse_graph 

Source
pub fn reverse_graph<N, ID, E>(
    input: impl Iterator<Item = Result<(N, Vec<GraphEdge<ID>>), E>>,
    as_id: impl Fn(&N) -> &ID,
) -> Result<Vec<(N, Vec<GraphEdge<ID>>)>, E>
where ID: Clone + Eq + Hash,
Expand description

Creates new graph in which nodes and edges are reversed.