Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2003-08-15 14:17:11


Hi Bruce,

Sounds like a good idea to me! Do you want to take a stab at making this
change? Perhaps just DFS to begin with and then the other algorithms
afterwards.

On Thu, 14 Aug 2003, Bruce Barr wrote:
schmoo> template <typename G>
schmoo> class dfs_traits {
schmoo> typedef typename graph_traits<G>::vertex_descriptor Vertex;
schmoo> typedef typename graph_traits<G>::out_edge_iterator Iter;
schmoo>
schmoo> public:
schmoo> typedef std::pair<Vertex, std::pair<Iter, Iter> > buffer_value_type;
schmoo> };

instead of "dfs_traits<G>::buffer_value_type" how about
"dfs_buffer_traits<G>::value_type"

schmoo>
schmoo> The buffer parameter could be added to each of the DFS based algorithms:
schmoo> connected_components(), strong_components(), topological_sort(),
schmoo> depth_first_visit(), and depth_first_search(). Also, non-named parameter
schmoo> overloads could be added to use a buffer parameter.

To preserve backwards compatibility, instead of changing the non-named
parameter overload, I suggest adding another overload (with a longer list
of parameters).

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk