The DirectedCycle represents a data type for determining whether a digraph has a directed cycle. The has_cycle operation determines whether the digraph has a simple directed cycle and, if so, the cycle operation returns one. This implementation uses depth-first search.
| 24 | /// returns one. |
| 25 | /// This implementation uses depth-first search. |
| 26 | pub struct DirectedCycle { |
| 27 | cycle: Option<Stack<usize>>, |
| 28 | edge_to: Vec<usize>, |
| 29 | marked: Vec<bool>, |
| 30 | on_stack: Vec<bool>, |
| 31 | } |
| 32 | |
| 33 | /// The EdgeWeightedDirectedCycle represents a data type for |
| 34 | /// determining whether an edge-weighted digraph has a directed cycle. |
nothing calls this directly
no outgoing calls
no test coverage detected