473,473 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

Oct 10 '05 #1
0 1522

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: nin234 | last post by:
My apologies in advance if any one is offended by this post. I have an unstable job in a start up company and thought of sharpening my skill sets. I noticed that many companies are asking for boost...
1
by: JD Kronicz | last post by:
Hi .. I have an issue I have been beating my head against the wall on for some time. I am trying to use late binding for MS graph so that my end users don't have to worry about having the right...
3
by: Jeff | last post by:
Hi I have a report with a graph on it and want to change the minimum and maximum values for the value axis when it is previewed. This can't be done by adding code in the Open event as once the...
3
by: Jef Driesen | last post by:
I'm trying to create a graph from an image, where pixel values are regions labels. I have defined my graph to use lists instead of the vectors (because I need to add/remove vertices and edges) and...
11
by: Andreas.Burman | last post by:
Hi What is the best way to implement a undirected weighted graph ADT in javascript?
1
by: George Sakkis | last post by:
I've just started toying with the python bindings of BGL and I'm puzzled from the following: True False It seems that the vertices iterator creates new vertex objects every time instead of...
0
by: Tim Frink | last post by:
Hi, I want to use the depth_first_search algorithm from the Boost Graph Library. However, I've problems with the definition of my own ColorMap. To illustrate this, here is an example (taken...
4
by: Man4ish | last post by:
namespace ve/////////////////ve.h { struct VertexProperties { std::size_t index; boost::default_color_type color; }; }...
1
by: RK | last post by:
I get the following compile-time error while trying to use the in_edges function in boost -- error: no matching function for call to ‘in_edges(vertex_descriptor&, Graph&) The weird part is...
1
by: Tim H | last post by:
Compiling with g++ 4: This line: if_then_else_return(_1 == 0, 64, _1) When called with a bignum class as an argument yields: /usr/include/boost/lambda/if.hpp: In member function 'RET...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.