__construct() __construct(object $graph) Constructor for the DFS algorithm. Parameters object $graph The graph to which the DFS algorithm should be applied Throws \InvalidArgumentException
run() run(mixed $root) Runs the DFS from a given vertex $vertex on the graph. Parameters mixed $root ID of the vertex from which the DFS should begin
get() get() : array Returns the result of the DFS. Returns array — Array of vertex distance to root, parents and vertices in DFS order