Index: depth_first_search.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/graph/depth_first_search.hpp,v retrieving revision 1.27 diff -c -3 -p -r1.27 depth_first_search.hpp *** depth_first_search.hpp 2001/11/04 23:24:12 1.27 --- depth_first_search.hpp 2001/11/28 05:28:22 *************** namespace boost { *** 93,101 **** } } // namespace detail ! template void ! depth_first_search(const VertexListGraph& g, DFSVisitor vis, ColorMap color) { function_requires >(); typedef typename property_traits::value_type ColorValue; --- 93,103 ---- } } // namespace detail ! template void ! depth_first_search(const VertexListGraph& g, DFSVisitor vis, ColorMap color, ! Vertex start_vertex) { function_requires >(); typedef typename property_traits::value_type ColorValue; *************** namespace boost { *** 106,111 **** --- 108,119 ---- put(color, *ui, Color::white()); vis.initialize_vertex(*ui, g); } + + if (start_vertex != *vertices(g).first) { + vis.start_vertex(start_vertex, g); + detail::depth_first_visit_impl(g, start_vertex, vis, color); + } + for (tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { ColorValue u_color = get(color, *ui); if (u_color == Color::white()) { *************** namespace boost { *** 115,142 **** } } ! namespace detail { template struct dfs_dispatch { ! template static void ! apply(const VertexListGraph& g, DFSVisitor vis, const bgl_named_params&, ColorMap color) { ! depth_first_search(g, vis, color); } }; template <> struct dfs_dispatch { ! template static void ! apply(const VertexListGraph& g, DFSVisitor vis, const bgl_named_params& params, detail::error_property_not_found) { --- 123,156 ---- } } ! template ! void ! depth_first_search(const VertexListGraph& g, DFSVisitor vis, ColorMap color) ! { ! depth_first_search(g, vis, color, *vertices(g).first); ! } + namespace detail { template struct dfs_dispatch { ! template static void ! apply(const VertexListGraph& g, DFSVisitor vis, Vertex start_vertex, const bgl_named_params&, ColorMap color) { ! depth_first_search(g, vis, color, start_vertex); } }; template <> struct dfs_dispatch { ! template static void ! apply(const VertexListGraph& g, DFSVisitor vis, Vertex start_vertex, const bgl_named_params& params, detail::error_property_not_found) { *************** namespace boost { *** 146,152 **** (g, vis, make_iterator_property_map (color_vec.begin(), choose_const_pmap(get_param(params, vertex_index), ! g, vertex_index), c) ); } }; --- 160,167 ---- (g, vis, make_iterator_property_map (color_vec.begin(), choose_const_pmap(get_param(params, vertex_index), ! g, vertex_index), c), ! start_vertex); } }; *************** namespace boost { *** 165,170 **** --- 180,187 ---- (g, choose_param(get_param(params, graph_visitor), make_dfs_visitor(null_visitor())), + choose_param(get_param(params, root_vertex_t()), + *vertices(g).first), params, get_param(params, vertex_color) );