Boost logo

Boost Users :

From: Louis Lavery (Louis_at_[hidden])
Date: 2003-03-05 02:50:05


----- Original Message -----
From: Tarjei Knapstad <tarjeik_at_[hidden]>
To: Boost-users <Boost-Users_at_[hidden]>; Boost-dev
<boost_at_[hidden]>
Sent: Tuesday, 04 March, 2003 10:42 PM
Subject: (from: [Boost-Users]) [BGL] Preconditioned color maps?

[snip]

> A possibility (as have recently been discussed IIRC) is to break off the
> DFS by throwing an exception the second time start_vertex is invoked in
> the visitor. I'm not too fond of that solution though, allthough I must
> admit that my visitor implementation above is not exactly "a beaut"...

A less drastic alternative is to, on the second call, just set all vertex
colours to black.

But I agree with you that a one_shot_depth_first_search that starts from
a given vertex and then gets out is called for.

In fact I find it difficult to understand why anyone would want to start
at a given vertex, do a dfs from there and then go on to start another
dfs from any unvisited vertices. Perhaps I lack imagination - anyone
got an example of its use?

Louis.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net