*** depth_first_search.html.orig Mon Aug 19 17:16:15 2002 --- depth_first_search.html Sun Aug 31 18:18:39 2003 *************** *** 27,43 ****
// named parameter version template <class Graph, class class P, class T, class R> ! void depth_first_search(Graph& G, const bgl_named_params<P, T, R>& params); // non-named parameter version template <class Graph, class DFSVisitor, class ColorMap> void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color) ! template <class Graph, class DFSVisitor, class ColorMap> void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color, ! typename graph_traits<Graph>::vertex_descriptor start)
--- 27,47 ----
// named parameter version template <class Graph, class class P, class T, class R> ! void depth_first_search(const Graph& g, const bgl_named_params<P, T, R>& params); // non-named parameter version template <class Graph, class DFSVisitor, class ColorMap> void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color) ! template <class Graph, class DFSVisitor, class ColorMap, class Vertex> void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color, ! Vertex start) + template <class Graph, class DFSVisitor, class ColorMap, class Vertex, + class Buffer> + void depth_first_search(const Graph& g, DFSVisitor vis, ColorMap color, + Vertex start, Buffer& S)
*************** *** 61,67 **** Similar to BFS, color markers are used to keep track of which vertices have been discovered. White marks vertices that have yet to be discovered, gray marks a vertex that is discovered but still has ! vertices adjacent to it that are undiscovered. A black vertex is discovered vertex that is not adjacent to any white vertices.
--- 65,71 ---- Similar to BFS, color markers are used to keep track of which vertices have been discovered. White marks vertices that have yet to be discovered, gray marks a vertex that is discovered but still has ! vertices adjacent to it that are undiscovered. A black vertex is a discovered vertex that is not adjacent to any white vertices.
*************** *** 70,76 **** actions at certain event-points within the algorithm. This provides a mechanism for adapting the generic DFS algorithm to the many situations in which it can be used. In the pseudo-code below, the ! event points for DFS are indicated in by the triangles and labels on the right. The user-defined actions must be provided in the form of a visitor object, that is, an object whose type meets the requirements for a DFS Visitor. In the pseudo-code --- 74,80 ---- actions at certain event-points within the algorithm. This provides a mechanism for adapting the generic DFS algorithm to the many situations in which it can be used. In the pseudo-code below, the ! event points for DFS are indicated by the triangles and labels on the right. The user-defined actions must be provided in the form of a visitor object, that is, an object whose type meets the requirements for a DFS Visitor. In the pseudo-code *************** *** 114,120 **** end for color[u] := BLACK f_time[u] := time := time + 1 !
--- 118,124 ---- end for color[u] := BLACK f_time[u] := time := time + 1 ! *************** *** 160,166 ****Parameters
! IN: Graph& gA directed graph. The graph type must be a model of Incidence Graph --- 164,170 ----IN: root_vertex(typename ! graph_traits<VertexListGraph>::vertex_descriptor start)Parameters
! IN: const Graph& gA directed graph. The graph type must be a model of Incidence Graph *************** *** 168,173 **** --- 172,184 ----+ IN: Vertex start ++ This specifies the vertex that the depth-first search should + originate from. The vertex type must be + graph_traits<Graph>::vertex_descriptor. ++Named Parameters
IN: visitor(DFSVisitor vis) *************** *** 196,202 ****This specifies the vertex that the depth-first search should originate from. The type is the type of a vertex descriptor for the --- 207,213 ----IN: root_vertex(typename ! graph_traits<Graph>::vertex_descriptor start)This specifies the vertex that the depth-first search should originate from. The type is the type of a vertex descriptor for the *************** *** 218,223 **** --- 229,249 ---- Default: get(vertex_index, g)+ UTIL: buffer(Buffer& S) ++ This is used to optimize memory usage and/or to determine the order + in which vertices will be discovered. If a stack (LIFO) is used, + then the traversal will be according to the usual DFS ordering. + Data structures other than a stack can be used, but the traversal + order will be different. The type Buffer must be a model of + Buffer. The value_type of the + buffer must be + boost::dfs_buffer_traits<Graph>::value_type.+
+ Default: std::stack<T, std::vector<T> >, + where T is + boost::dfs_buffer_traits<Graph>::value_type +