Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-01-12 20:02:57


Dave Abrahams writes:
> > Couple questions:
> >
> > what does last_edge() do?
> Gets the last edge from the path
>
> > what happens inside your visit() function?
>
> Probably nothing in this algorithm; it was only there by extension from the
> supposedly generic version we started with.
> I guess the algorithm still isn't quite right, since I want to label the
> node copies with their total cost from the start. This would require yet
> another departure from the supposedly generic form.
>
> Now do you begin to see why a _truly_ generic algorithm could be really
> difficult to write?

Yeah, perhaps trying to make the generic graph search apply to your
case is not the right thing to do, and that is OK. For example, you
can't write every sequential container algorithm using std::transform :)

The graph_search does apply well to standard depth-first,
breadth-first, and some other common algorithms like dijkstra's and
prim's.

Ciao,

Jeremy


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