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?
|All times are GMT. The time now is 07:11 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.