
On Fri, 18 Feb 2011, al.zatv wrote:
Jeremiah Willcock
писал(а) в своём письме Fri, 18 Feb 2011 02:14:08 +0300: Do those versions work?
Yes, they work as they should on graphs with adjacent_list
and with adjacent_list I don't check them on other types of graphs.
It turns out that what you are doing will work in general.
I forgot whether edge_descriptors in the original graph are implicitly convertible to edge_descriptors in the reverse_graph; your implementations require that. Your code would be easy to fix for the other case, though. Could you please add in the rest of the mutating functions so that I can add your code to BGL?
OK. My code in Boost - that's will be great:) I'll send that code to you later. But I don't know about iterators and descriptors stability: if some code in BGL assumes that it can delete an edge, and iterator on next edge will stay valid, it will fail with reverse_graph. I just don't know BGL good enought to understand if it can be a problem or not.
Iterator validity is up to the underlying graph; your functions will not change that behavior at all. -- Jeremiah Willcock