
On 29/03/2011 02:20, Jeremiah Willcock wrote:
On Mon, 28 Mar 2011, Andrew Sutton wrote:
(snip)
Another feature that has been on BGL's want list is the implementation of algorithm objects.
For example?
Just a class that wraps the algorithm. There are several in the BGL. The technique offers a little more flexibility when the number of parameters is large.
I think the original intent of algorithm objects for BGL is inversion of control flow: instead of something like BFS calling visitor methods at event points, you have a BFS object that suspends itself where it would have called the visitor, and then is continued by surrounding code. This makes it easier to do things like interleave two BFS runs at the same time, which you can't do with the existing model (without threads or coroutines).
To me that would be the most valuable aspect of algorithm classes. For the purpose of suspending and restarting the Dijkstra shortest path algorithm I built a class around existing BGL code that works perfectly fine for me. I am happy to share it, even though it is surely not up to Boost standards. Alex