From 5587566c0ca25dbfcc3bdbe1a9adca6c4dbd5e85 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Fri, 23 Feb 2001 00:58:05 +0000 Subject: [PATCH] added a constructor [SVN r9314] --- include/boost/graph/adjacency_list.hpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/include/boost/graph/adjacency_list.hpp b/include/boost/graph/adjacency_list.hpp index 3868d7f1..73f24443 100644 --- a/include/boost/graph/adjacency_list.hpp +++ b/include/boost/graph/adjacency_list.hpp @@ -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 - 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 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 + 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);