pub fn find_superbubble(
graph: &DiGraph<String, f32>,
s: NodeIndex,
direction: Direction,
) -> Option<(NodeIndex, NodeIndex, Vec<NodeIndex>)>
Expand description
Find a superbubble in a directed graph. See reference implementation at bubble_gun for more details.
§Arguments
graph
- A directed graph.s
- The starting node.direction
- The direction to traverse the graph.
§Returns
A tuple containing the starting node, ending node, and the nodes inside the superbubble.
§Panics
Panics if the graph is not a directed graph.