Problems recognizing directionality of an edge
I am using boost 1.33.0. I'm the guy who is working with spanning trees. I've decided that two graphs are in order. 1. The data graph, of type Graph, is bidirectional. 2. The tree graph, of type Tree, is undirectional. Tree is undirectional because this is the only way that I get expected results from a dfs. However, the direction of the associated edge needs to be recorded as a property in the Tree graph. I'm having difficulty in initializing this property. The problem is that when I create the spanning tree, all I have is an Graph::edge_descriptor. I find that an edge will always be in the target vertex's in_edges container, and in the source vertex's out_edges container. This don't allow identification of the edge direction. Am I missing something?
On Oct 24, 2005, at 8:32 AM, Jeffrey Holle wrote:
I am using boost 1.33.0.
I'm the guy who is working with spanning trees. [snip] The problem is that when I create the spanning tree, all I have is an Graph::edge_descriptor. I find that an edge will always be in the target vertex's in_edges container, and in the source vertex's out_edges container.
For a directed (or bidirectional) graph, all edges go from source(e, g) to target(e, g). It's only ambiguous for undirected graphs. However, I think we may be having a clash of terminology that's confusing me. Could you sketch out the code and data structures you're using to build this Tree, so I can give a more detailed response? Doug
participants (2)
-
Douglas Gregor
-
Jeffrey Holle