reachableFrom

fun reachableFrom(start: A): Set<A>(source)

All agents reachable from start via outgoing edges (BFS). Includes start itself. For undirected networks this is the connected component containing start; for directed networks it's the forward-reachable set (also called "out-component"). To get a weakly-connected-component style answer for a directed graph, the caller can union with reachableFrom walking inEdges, or invert the graph.