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

Function cycle

tests/test_undirected_graph.rs:130–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128
129#[test]
130fn cycle() {
131 let graph = create_graph(TINY_G);
132 let c = Cycle::new(graph.as_ref());
133 assert!(c.has_cycle());
134 assert!(c.cycle().unwrap().eq(vec![3, 4, 5, 3].iter()));
135}
136
137#[test]
138fn two_color() {

Callers

nothing calls this directly

Calls 1

create_graphFunction · 0.70

Tested by

no test coverage detected