Returns the set of node indices reachable from the root node via a simple depth-first search.
(&self)
| 497 | /// Returns the set of node indices reachable from the root node via a |
| 498 | /// simple depth-first search. |
| 499 | fn connected_nodes(&self) -> HashSet<NodeIndex> { |
| 500 | let mut nodes = HashSet::new(); |
| 501 | let mut dfs = Dfs::new(&self.graph, self.root); |
| 502 | while let Some(node) = dfs.next(&self.graph) { |
| 503 | nodes.insert(node); |
| 504 | } |
| 505 | nodes |
| 506 | } |
| 507 | |
| 508 | /// Updates intervals for all expressions in the DAEG by successive |
| 509 | /// bottom-up and top-down traversals. |
no test coverage detected