This implementation uses depth-first search. The constructor takes time proportional to V + E (in the worst case), where V is the number of vertices and E is the number of edges.
Computes the vertices in digraph G that are connected to any of the source vertices sources.
G
sources
the graph
the source vertices
Generated using TypeDoc
This implementation uses depth-first search. The constructor takes time proportional to V + E (in the worst case), where V is the number of vertices and E is the number of edges.