[−][src]Module rs_graph::search::dfs
Depth-first-search.
Example
use rs_graph::LinkedListGraph; use rs_graph::traits::*; use rs_graph::classes; use rs_graph::search::dfs; let g: LinkedListGraph = classes::peterson(); let mut cnt = 0; for (u, e) in dfs::start(g.neighbors(), g.id2node(0)) { assert_ne!(g.node_id(u), 0); cnt += 1; } assert_eq!(cnt, g.num_nodes() - 1);
Structs
DFS |
Functions
default_data | Return the default data structure to be used in the DFS. |
start | Start and return a DFS iterator using default data structures. |
start_with_data | Start and return a DFS iterator with user defined data structures. |
Type Definitions
DFSDefault | DFS iterator with default data structures. |