Skip to main content

has_cycles

Function has_cycles 

Source
pub fn has_cycles(graph: &BlockingGraph) -> bool
Expand description

Check whether the blocking graph has any cycles at all.

More efficient than find_all_cycles when you only need a boolean answer — it short-circuits on the first cycle found.

§Complexity

O(V+E) in the worst case (no cycles). O(1) best case (immediate self-loop).