MCPcopy Create free account
hub / github.com/douchuan/algorithm / has_cycle

Method has_cycle

src/graph/undirected/cycle.rs:36–38  ·  view source on GitHub ↗

Returns true if the graph G has a cycle.

(&self)

Source from the content-addressed store, hash-verified

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>> {

Callers

nothing calls this directly

Calls 1

is_someMethod · 0.80

Tested by

no test coverage detected