Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Boost.graph - changing edge end-points or copying an edge

Thread Tools

Boost.graph - changing edge end-points or copying an edge

Ferdi Smit
Posts: n/a
I wrote a generic algorithm for boost.graph to merge two vertices, ie. the
end-points of an edge are joined together as if they are a single
vertex. I'm currently doing this by creating a new vertex, and creating an
edge to this new vertex from every incident vertex of any of the
end-points (and then deleting the end points and every incident edge).
The problem with this approach is that edge properties are not maintained.
The newly added edges should be copies of the old edges, with the same
properties. Alternatively it would be ok if it was possible to change the
source or target of an existing edge to a different vertex.

As far as I can tell from browsing through the documentation this is not
possible. I could manually copy some properties, but then the algorithm
loses its generality. Is there a way to copy an edge or vertex, including
all its properties? Alternatively is there a way to change the
source/target vertex of an edge?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lenovo ThinkPad EDGE 13: Bleeding Edge Ian Front Page News 0 02-28-2011 10:18 AM
using both rising edge and falling edge of signal denish VHDL 5 11-17-2008 07:12 PM
Copying files and changing their names SamF Ruby 4 03-14-2007 05:42 PM
Copying File or Changing File Date Java 0 02-24-2005 12:38 AM
Difficulty in changing the Connection Server control path changing ... Samridhi Kumar Shukla ASP .Net 1 11-30-2003 02:31 AM