The DepthFirstOrder represents a data type for determining depth-first search ordering of the vertices in a digraph or edge-weighted digraph, including preorder, postorder, and reverse postorder. This implementation uses depth-first search.
| 8 | /// postorder. |
| 9 | /// This implementation uses depth-first search. |
| 10 | pub struct DepthFirstOrders { |
| 11 | pre_order: Vec<usize>, // vertices in preorder |
| 12 | pre: Vec<usize>, // pre[v] = preorder number of v |
| 13 | pre_counter: usize, // counter or preorder numbering |
| 14 | post_order: Vec<usize>, // vertices in postorder |
| 15 | post: Vec<usize>, // post[v] = postorder number of v |
| 16 | post_counter: usize, // counter for postorder numbering |
| 17 | marked: Vec<bool>, // marked[v] = has v been marked in dfs? |
| 18 | } |
| 19 | |
| 20 | impl DepthFirstOrders { |
| 21 | /// Returns the vertices in preorder. |
nothing calls this directly
no outgoing calls
no test coverage detected