|
Boost Users : |
From: Nicholas Burlett (nrb23_at_[hidden])
Date: 2004-03-30 17:26:01
I am trying to use BGL to model a directed multigraph, but every time I
try to remove just one of the edges (u,v), it removes all of the edges
from u to v.
My graph definition is:
typedef adjacency_list<listS, listS, bidirectionalS,
VertexProperty, EdgeProperty> graphdata;
where VertexProperty and EdgeProperty are properties I've defined.
Everything else seems to work: I have can add parallel edges, find the
edge I want to remove based on the EdgeProperty, filter the graph for
topological sorting, check for existing edges, etc.
In the following, e is of type
graph_traits<graphdata>::edge_descriptor, and g is the graph of type
graphdata (defined above):
std::cout << "about to remove edge\n";
DumpInfo();
remove_edge(e, g);
std::cout << "removed edge\n";
DumpInfo();
Here is some sample output:
about to remove edge
vertex: 0
out-edges:
in-edges: (1,0) (1,0)
adjacent vertices:
vertex: 1
out-edges: (1,0) (1,0)
in-edges:
adjacent vertices: 0 0
removed edge
vertex: 0
out-edges:
in-edges:
adjacent vertices:
vertex: 1
out-edges:
in-edges:
adjacent vertices:
Note that there were two edges present before the call to remove_edge,
but only one after.
What am I doing wrong?
I'm using version 1.31, if that helps.
Thanks,
Nicholas Burlett
nrb23_at_[hidden]
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net