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

added a constructor

[SVN r9314]
This commit is contained in:
Jeremy Siek
2001-02-23 00:58:05 +00:00
parent 7e9e7069db
commit 5587566c0c

View File

@@ -338,15 +338,18 @@ namespace boost {
return *this;
}
// Required by Mutable Graph
inline adjacency_list(vertices_size_type num_vertices,
const GraphProperty& p = GraphProperty())
: Base(num_vertices), m_property(p) { }
// Required by Iterator Constructible Graph
template <class EdgeIterator>
inline adjacency_list(vertices_size_type num_vertices,
EdgeIterator first, EdgeIterator last,
inline adjacency_list(EdgeIterator first, EdgeIterator last,
vertices_size_type n = 0,
edges_size_type m = 0,
const GraphProperty& p = GraphProperty())
: Base(num_vertices, first, last), m_property(p) { }
: Base(n, first, last), m_property(p) { }
template <class EdgeIterator, class EdgePropertyIterator>
inline adjacency_list(vertices_size_type num_vertices,
@@ -355,6 +358,14 @@ namespace boost {
const GraphProperty& p = GraphProperty())
: Base(num_vertices, first, last, ep_iter), m_property(p) { }
// Deprecated
template <class EdgeIterator>
inline adjacency_list(vertices_size_type num_vertices,
EdgeIterator first, EdgeIterator last,
const GraphProperty& p = GraphProperty())
: Base(num_vertices, first, last), m_property(p) { }
void swap(adjacency_list& x) {
// Is there a more efficient way to do this?
adjacency_list tmp(x);