Interface DFSVisitor<T>

    • Method Detail

      • visit

        void visit​(Graph<T> g,
                   Vertex<T> v)
        Called by the graph traversal methods when a vertex is first visited.
        Parameters:
        g - - the graph
        v - - the vertex being visited.
      • visit

        void visit​(Graph<T> g,
                   Vertex<T> v,
                   Edge<T> e)
        Used dfsSpanningTree to notify the visitor of each outgoing edge to an unvisited vertex.
        Parameters:
        g - - the graph
        v - - the vertex being visited
        e - - the outgoing edge from v