C++ Boost

depth_first_visit

Graphs: directed and undirected
Properties: color
Complexity: time: O(E)
Where Defined: boost/graph/depth_first_search.hpp

template <class IncidenceGraph, class DFSVisitor, class ColorMap>
void depth_first_visit(IncidenceGraph& g,
  typename graph_traits<IncidenceGraph>::vertex_descriptor s, 
  DFSVisitor& vis, ColorMap color)

This function visits all of the vertices in the same connected component as the source vertex s, using the depth-first pattern. The main purpose of the function is for the implementation of depth_first_search() though sometimes it is useful on its own.

The DFSVisitor supplied by the user determines what actions are taken at each event-point within the algorithm.

The ColorMap is used by the algorithm to keep track of which vertices have been visited.

Requirements on Types



Copyright © 2000 Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu)