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

Function search

tests/test_directed_graph.rs:91–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89
90#[test]
91fn search() {
92 let graph = create_digraph(TINY_DG);
93 let reach = DirectedDFS::new_single(graph.as_ref(), 1);
94 assert!(!reach.marked(0));
95 assert!(reach.marked(1));
96 let reach = DirectedDFS::new_multi(graph.as_ref(), &vec![0, 1]);
97 assert!(reach.marked(2));
98 assert!(reach.marked(3));
99}
100
101#[test]
102fn cycle() {

Callers

nothing calls this directly

Calls 1

create_digraphFunction · 0.85

Tested by

no test coverage detected