Function directed_shortest_cycle

Source
pub fn directed_shortest_cycle<E: EdgeTrait>(
    g: &Graph<Directed, E>,
    src: usize,
) -> Option<Vec<&E>>
Expand description

有向グラフで単一始点の最短サイクルを求める。

Time complexity $O(V + E)$