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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user