From 6509b5286c86d088c47cc629704f898b9e93e73e Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Tue, 22 May 2001 02:04:19 +0000 Subject: [PATCH] added specialization of vertex_property and edge_property traits classes [SVN r10183] --- include/boost/graph/leda_graph.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/boost/graph/leda_graph.hpp b/include/boost/graph/leda_graph.hpp index 5d1050d3..f1a7cfb2 100644 --- a/include/boost/graph/leda_graph.hpp +++ b/include/boost/graph/leda_graph.hpp @@ -173,6 +173,17 @@ namespace boost { typedef int edges_size_type; typedef int degree_size_type; }; + + template + struct vertex_property< GRAPH > { + typedef vtype type; + }; + + template + struct edge_property< GRAPH > { + typedef etype type; + }; + } // namespace boost #endif @@ -294,6 +305,13 @@ namespace boost { return g.new_node(); } + template + typename graph_traits< GRAPH >::vertex_descriptor + add_vertex(const vtype& vp, GRAPH& g) + { + return g.new_node(vp); + } + // Hmm, LEDA doesn't have the equivalent of clear_vertex() -JGS // need to write an implementation template