Sorry, I though you just wanted to entirely preclude graphs with parallel
edges. So given a graph that does have parallel edges you want to remove, it
sounds like you need an algorithm to search for and catalog them (a visitor
of some sort, not sure which because I don't know the semantics of your
graph). Perhaps such an algorithm exists already in the library. I can't
comment directly because I haven't had to solve this problem in my own work
(yet). My idea is to use a visitor to locate the edges that meet your
criteria, store them in some external STL container, and then when the
algorithm returns, you can enumerate the container and remove the edges
(don't be a silly fool like I was earlier this week and start removing edges
in the visitor code). HTH - Chris
"Arthur"
The section pointed out says to use a set instead of list if you don't want parallel edges. I guess I was hoping to have parallel edge removal using a list (insertion/deletion consideration appear to make the list a better choice for me).
A
--- In Boost-Users@yahoogroups.com, "Arthur"
wrote: Saw that... didn't help. Too many program fragments and not enough complete code examples IMHO. I guess I'll just have to figure it out the hard way.
A
--- In Boost-Users@yahoogroups.com, "Chris Russell"
wrote: Arthur,
see the following:
http://www.boost.org/libs/graph/doc/using_adjacency_list.html ^- see specifically "Choosing the EdgeList type".. Sequence vs. AssociativeContainer vs. UniqueAssociativeContainer
http://cvs.sourceforge.net/cgi- bin/viewcvs.cgi/boost/boost/libs/graph/example/container_gen.cpp? rev=1.1&content-type=text/vnd.viewcvs-markup ^- container_gen.cpp example
HTH - Chris
"Arthur"
wrote in message news:bbnl0i+k498@e... I'm trying to use this graph class without detailed reading. I can't find a decent, clear example of doing this. I have a simple graph:
typedef adjacency_list
Graph;
What do I do to prevent parallel edges to be inserted?
Thanks for any help offered, Arthur
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/