
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.
Is there any particular reason you are choosing this behavior? What particular use cases does this address? It may be acceptable to not define unions between undirected and directed graphs.
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.
Type casting is not a viable solution.
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.
Properties are never actually "undeclared". There is always a type that represents the vertex and edge properties of a graph. You will have to look a little closer at the implementation of the BGL graph data structures in order to determine an acceptable approach. Andrew Sutton andrew.n.sutton@gmail.com