Returns true if the graph G has a cycle.
(&self)
| 34 | |
| 35 | /// Returns true if the graph G has a cycle. |
| 36 | pub fn has_cycle(&self) -> bool { |
| 37 | self.cycle.is_some() |
| 38 | } |
| 39 | |
| 40 | /// Returns a cycle in the graph G. |
| 41 | pub fn cycle(&self) -> Option<Iter<'_, usize>> { |