$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [BGL] IncidenceGraph and out_edges
From: chris (christian-baehnisch_at_[hidden])
Date: 2009-06-19 13:39:41
> What do you mean "doesn't work?". You have to be more explicit.
Let's say I have an edge type in my datastructure which has two references to 
its incident vertices and I have the source and target functions implemented 
such that I can get the two vertices. Let's also say the edge type is not so 
lightweighted and I use some kind of handle, i.e. and index or pointer, to 
pass them around. I implement out_edges such that the iterator can be used to 
access all edges incident to a vertex via the handles. 
 
If out_edge together with target is used to get all incident vertices - as 
done in BGL - I must impose an artificial direction on the edges, i.e. i have 
to attach a flip flag or something similar in order to guarantee that the target 
function returns the desired vertex next time it is called. If you use an 
lightweited edge type such as std:pair this is not problematic, as the edges 
can be created on the fly by out_edges_iterator with the desired implicit 
direction. 
So my question is why BGL doesn't use adjacency_iterator for vertex-ring 
traversal in their algorithms?!  If done so I could implement 
adjacency_iterator for my datastructure without the headache of implicit 
directions! 
I hope this was explicit enough and thank you in advance for your patience!
best regards, Chris