Boost logo

Boost Users :

From: Nicholas Burlett (nrb23_at_[hidden])
Date: 2004-03-31 14:41:57


I modified the edge_property.cpp example to demonstrate the problem. I
added an edge of flow 42 to the graph defined in the file so that there
are now two edges (3,6) with different capacities. I then loop through
the graph, and remove any edges that have flow of 42 by calling
remove_edge(e, G). Since there is only one edge in the graph that has
flow 42, this calls remove_edge only once. As is evident by the output
of the program, both edges (3,6) get removed from the graph.

I hope this will help you find the problem.

Thanks,
Nicholas Burlett
nrb23_at_[hidden]


On Mar 31, 2004, at 11:26 AM, Jeremy Siek wrote:

> Hi Nicholas,
>
> That sounds like a bug. Could you post a complete C++ program so I can
> immediately reproduce the problem.
>
> Thanks,
> Jeremy
>
> On Mar 30, 2004, at 5:26 PM, Nicholas Burlett wrote:
>
>> 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 mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
> _______________________________________________
> Jeremy Siek <jsiek_at_[hidden]>
> http://www.osl.iu.edu/~jsiek
> Ph.D. Student, Indiana University Bloomington
> Graduating in August 2004 and looking for work
> C++ Booster (http://www.boost.org)
> _______________________________________________
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users



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