Hi, I'm planning to throw away my own little undirected graph implementation in favor of Boost Graphs. My implementation is based on an STL map< Node,set<Node> > adjecency map. I see that it's very easy to get the same functionality using the BGL adjecency_list. But what I really like about my implementation is that I have const set<Node>& Graph::lookupNeighbours(const Node&) const; This means that in no time I can get a _container_ of the neighbours, and not just a pair of iterators. Of course teoretically they are equivalent. But I want to rewrite as little code as possible, so I would like to wrap my old graph interface around the Boost Graph. (Not hiding its own, better interface, of course. :) ) Should I write a wrapper container class simulating const set<Node>? Or does adjecency_list expose the very same const set<Node>& for me?
participants (1)
-
Daniel Varga