[BGL] single pair problem with bfs
Hi everybody! I really need to perform the single-pair problem. I have begin to implement it as it is written in some mail of the mailing list. I do a breadth first search and I want to use both a visitor recor_distances and a visito of my own which throws an exception to stop the algorithm when the destination is found. My problem is that I did'nt found the way to mix theses two visitors. Can you help me? regards, Jérémie ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
the original code is like that:
/*
template <class Visitors = null_visitor>
class bfs_visitor {
...
};
typedef bfs_visitor<> default_bfs_visitor;
*/
I have no experience with that but I would try to do use a template instantiation of bfs_visitor
class bfs_my_visitor:public default_bfs_visitor { ... public: bfs_stop_visitor(...) {} template < typename Vertex, typename Graph > void finish_vertex(Vertex u, const Graph & g) const { ... } };
Jérémie Leguay schrieb:
Hi everybody!
I really need to perform the single-pair problem. I have begin to implement it as it is written in some mail of the mailing list. I do a breadth first search and I want to use both a visitor recor_distances and a visito of my own which throws an exception to stop the algorithm when the destination is found. My problem is that I did'nt found the way to mix theses two visitors. Can you help me?
regards,
Jérémie
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (2)
-
Jérémie Leguay
-
Stephan Höfer