[Graph] Concept check VertexMutablePropertyGraph

Hi, http://www.boost.org/doc/libs/1_48_0/libs/graph/doc/MutablePropertyGraph.htm... (I cannot find docs for VertexMutablePropertyGraph or EdgeMutablePropertyGraph) says that the types boost::graph_traits<G>::vertex_property_type and boost::graph_traits<G>::edge_property_type must exist. However, the concept checks (in boost/graph/graph_concepts.hpp) check for vertex_property_type<G>::type and edge_property_type<G>::type, respectively. Several questions: 1. Should there be separate docs for VertexMutablePropertyGraph and EdgeMutablePropertyGraph? 2. Should there be an actual concept check implementation for MutablePropertyGraph combining the two? 3. Should the concept check look for boost::graph_traits<G>::vertex_property_type instead of ertex_property_type<G>::type? [and the same for edge] 4. For the LEDA adapter, i.e., external adaptation, do I have to specialize vertex_property_type<G> and edge_property_type<G>? Best, Jens

Am 03.01.2012 12:15, schrieb Jens Müller:
Several questions:
1. Should there be separate docs for VertexMutablePropertyGraph and EdgeMutablePropertyGraph?
2. Should there be an actual concept check implementation for MutablePropertyGraph combining the two?
3. Should the concept check look for boost::graph_traits<G>::vertex_property_type instead of ertex_property_type<G>::type? [and the same for edge]
4. For the LEDA adapter, i.e., external adaptation, do I have to specialize vertex_property_type<G> and edge_property_type<G>?
If I could get answers to some or all of these questions, I could start producing respective patches ... -- Jens

On Tue, 3 Jan 2012, Jens Müller wrote:
Hi,
http://www.boost.org/doc/libs/1_48_0/libs/graph/doc/MutablePropertyGraph.htm... (I cannot find docs for VertexMutablePropertyGraph or EdgeMutablePropertyGraph) says that the types boost::graph_traits<G>::vertex_property_type and boost::graph_traits<G>::edge_property_type must exist.
However, the concept checks (in boost/graph/graph_concepts.hpp) check for vertex_property_type<G>::type and edge_property_type<G>::type, respectively.
Several questions:
1. Should there be separate docs for VertexMutablePropertyGraph and EdgeMutablePropertyGraph?
Perhaps -- I don't know whether it was intended that a graph might have vertex properties but not edge properties. No algorithms appear to use either of the concept checks.
2. Should there be an actual concept check implementation for MutablePropertyGraph combining the two?
Yes, I think so.
3. Should the concept check look for boost::graph_traits<G>::vertex_property_type instead of ertex_property_type<G>::type? [and the same for edge]
No -- the documentation should be updated.
4. For the LEDA adapter, i.e., external adaptation, do I have to specialize vertex_property_type<G> and edge_property_type<G>?
Yes. You may also need to be careful to avoid a problem like the one in https://svn.boost.org/trac/boost/ticket/1021 (I don't know how LEDA properties work). -- Jeremiah Willcock

Am 05.01.2012 14:15, schrieb Jeremiah Willcock:
On Tue, 3 Jan 2012, Jens Müller wrote:
Hi,
http://www.boost.org/doc/libs/1_48_0/libs/graph/doc/MutablePropertyGraph.htm... (I cannot find docs for VertexMutablePropertyGraph or EdgeMutablePropertyGraph) says that the types boost::graph_traits<G>::vertex_property_type and boost::graph_traits<G>::edge_property_type must exist.
However, the concept checks (in boost/graph/graph_concepts.hpp) check for vertex_property_type<G>::type and edge_property_type<G>::type, respectively.
Several questions:
1. Should there be separate docs for VertexMutablePropertyGraph and EdgeMutablePropertyGraph?
Perhaps -- I don't know whether it was intended that a graph might have vertex properties but not edge properties. No algorithms appear to use either of the concept checks.
I leave that out for now. I first have to understand the structure of the Graph and Propery concepts better. Unlike MutablePropertyGraph, PropertyGraph also has the PropertyTag as template parameter. To be honest, I don't really see a reason to check whether a Graph has property maps at all - I would want to know whether it has a specific property ...
2. Should there be an actual concept check implementation for MutablePropertyGraph combining the two?
Yes, I think so.
Done.
3. Should the concept check look for boost::graph_traits<G>::vertex_property_type instead of ertex_property_type<G>::type? [and the same for edge]
No -- the documentation should be updated.
Done. Patch is attached.
4. For the LEDA adapter, i.e., external adaptation, do I have to specialize vertex_property_type<G> and edge_property_type<G>?
Yes. You may also need to be careful to avoid a problem like the one in https://svn.boost.org/trac/boost/ticket/1021 (I don't know how LEDA properties work).
I will do that later. -- Jens
participants (2)
-
Jens Müller
-
Jeremiah Willcock