Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Boost.graph - changing edge end-points or copying an edge (http://www.velocityreviews.com/forums/t448951-boost-graph-changing-edge-end-points-or-copying-an-edge.html)

Ferdi Smit 10-10-2005 04:30 PM

Boost.graph - changing edge end-points or copying an edge
 
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?

Thanks,
-Ferdi







All times are GMT. The time now is 04:49 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.