The latter implies that undirected graphs have to have two copies of each edge, one pointed each direction.
Which is correct? The former, I hope :-) Thanks.
The latter implies that undirected graphs have to have two copies of each edge, one pointed each direction.
Which is correct? The former, I hope :-) Thanks.
Undirected graphs store only one set of edges. The implementation of the just makes it seem like two different copies :)
Undirected graphs store only one set of edges. The implementation of the just makes it seem like two different copies :)
I'm not sure I understand your response. I was being sloppy and using edge and edge descriptor interchangeably (since there is no separate concept of an edge).
Currently our graph uses a pointer to an edge object as an edge descriptor. Getting the "source" using such an edge descriptor can't always return v since it has no way of knowing where the edge descriptor came from.
I can change the edge descriptor to be a pair of vertices, which would solve the problem, but don't want to if not needed.
So the answer to what I think Daniel is asking is "it won't work". In particular:Currently our graph uses a pointer to an edge object as an edge descriptor. Getting the "source" using such an edge descriptor can't always return v since it has no way of knowing where the edge descriptor came from.will cause algorithms like breadth_first_search to break.I can change the edge descriptor to be a pair of vertices, which would solve the problem, but don't want to if not needed.I think it's needed if algorithms like the BGL breadth_first_search are going to work. No?