Boost logo

Boost Users :

From: Krishna Roskin (krish_at_[hidden])
Date: 2007-10-18 03:31:28


Hello all,

I'm working on implicitly defined graphs using the graph boost
library. The out_edges function (for example) generates the list of
out edges on the fly and returns a shared_container_iterator. Creating
this list takes a non-trivial amount of time and so I'd like to cache
the result of out_edges so that future calls don't duplicate.

But I'm not sure how to do this and still fit within the "BGL way." My
first instinct was to add the cache as a member of the graph. But this
means that out_edges has to take a non-const reference so that it can
update the graph and this causes problems for filtered_graph and
reverse_graph.

Right now I'm toying with making my cache global and keyed to the
address of the graph but this seems inelegant.

Anyone have any suggestions?

-krish


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