pub fn reachable_from(graph: &Graph, source: u32) -> SortedIntView<'static>Expand description
Returns the nodes reachable from source, in ascending order and with source included.
Equivalent to reachable_from_sources(graph, &[source]) - Java’s
overload reachableFrom(Graph, int).
Time: O(node_count + edge_count).
Memory: as for reachable_from_sources.
§Panics
With an index out of bounds message if source is not in 0..node_count.