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

Discussion in 'C++' started by Ferdi Smit, Oct 10, 2005.

  1. Ferdi Smit

    Ferdi Smit Guest

    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
     
    Ferdi Smit, Oct 10, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Sakkis
    Replies:
    1
    Views:
    465
    Szabolcs Nagy
    Jan 29, 2007
  2. Jef Driesen
    Replies:
    3
    Views:
    2,567
    mlimber
    Jan 24, 2006
  3. denish
    Replies:
    5
    Views:
    5,706
  4. Almoni
    Replies:
    0
    Views:
    3,117
    Almoni
    Jan 17, 2010
  5. Emilio Mayorga
    Replies:
    6
    Views:
    352
    Martien Verbruggen
    Oct 8, 2003
Loading...

Share This Page