|
Boost : |
From: jsiek_at_[hidden]
Date: 2000-01-12 20:27:50
Have you looked at the dijkstra's algorithm in the graph_code? It has
a visitor that allows you to extend it. If you need to access the
weights in the visitor code, then just put a property accessor for it
inside the visitor object.
Dave Abrahams writes:
> > 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.
>
> I don't think I buy that argument. What I want abstracted out is the
> best-first (dijkstra) traversal of the graph. That shouldn't be such a tall
> order. The real problem is that of getting enough (the right) information
> back to the client about what's going on.
>
> -Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk