2
0
mirror of https://github.com/boostorg/graph.git synced 2026-02-11 11:52:12 +00:00

added specialization of vertex_property and edge_property traits classes

[SVN r10183]
This commit is contained in:
Jeremy Siek
2001-05-22 02:04:19 +00:00
parent 26229bc41d
commit 6509b5286c

View File

@@ -173,6 +173,17 @@ namespace boost {
typedef int edges_size_type;
typedef int degree_size_type;
};
template <class vtype, class etype>
struct vertex_property< GRAPH<vtype,etype> > {
typedef vtype type;
};
template <class vtype, class etype>
struct edge_property< GRAPH<vtype,etype> > {
typedef etype type;
};
} // namespace boost
#endif
@@ -294,6 +305,13 @@ namespace boost {
return g.new_node();
}
template <class vtype, class etype>
typename graph_traits< GRAPH<vtype,etype> >::vertex_descriptor
add_vertex(const vtype& vp, GRAPH<vtype,etype>& g)
{
return g.new_node(vp);
}
// Hmm, LEDA doesn't have the equivalent of clear_vertex() -JGS
// need to write an implementation
template <class vtype, class etype>