Skip to main content

of

Function of 

Source
pub fn of(graph: &Graph) -> Edges
Expand description

Returns the back edges of graph, in the order in which the search finds them.

Unlike the other results that list edges, they do not come in edge index order. For that order, use Edges::of(&EdgeTypes::of(graph), EdgeType::Back): the same edges, at the cost of classifying every edge first.

Time: O(node_count + edge_count). Memory: 12 bytes per back edge for the result; while it runs, up to 18 bytes more per back edge, 2 bits per node and up to 8 x node_count bytes for the stack, which grows with the deepest path.

ยงPanics

With an invalid argument message if a depth-first path is longer than 2^30 - 5 nodes.