Subject: Re: [boost] GSOC 2010 - BGL Graph Connectives.
From: Tri Nguyen (nvutri_at_[hidden])
Date: 2010-03-31 02:04:05
On 3/29/2010 7:57 AM, Andrew Sutton wrote:
> The approach looks like it might be viable, but it won't work for graphs
> with non-integral vertex descriptors. This will fail to compile, for example
> with directed_graph and undirected_graph. Also, how do you propose to manage
> vertex and edge properties? This algorithm doesn't deal with them.
> Andrew Sutton
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Dear Mr Sutton,
Thanks for your reply. It is true that the above code does not deal with
those problems yet; I just wanted to clarify my approach.
About dealing with the undirected and directed graph, I think the Union
of those will be a mixed graph, which I could not find in BGL.
Therefore, I suggest two special situations which happen when
programmers try to unite undirected and directed graphs :
1) Union ( undi, di ) returns an undi graph : I will convert the
directed graph to undirected by adding arcs. Then, I unite them.
2) Union ( undi, di ) returns a di graph : I will consider the
undirected graph as a directed one with two same arcs between vertices.
About solving the vertex and edge properties, actually, I am working on
it to figure out the best way. However, I want to present the idea that
I have come up with:
1) If the Union_graph 's properties is clearly declared, I will use
type-casting. Nevertheless, the challenge is to deal with the
non-integral data type.
2) If the Union_graph 's property is undeclared, I will try to integrate
two properties. In particular, the vertices and edges of graph 1 will
still keep their own properties; but they will also have graph_2 's
properties, in which values will be initialized as 0.
I would like to know your opinion.
I look forward to your comment,
Thank you so much,