From 6619f95046ef988e014e4917e10a520e6025db65 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Mon, 5 Mar 2001 20:01:01 +0000 Subject: [PATCH] Join ralf_grosse_kunstleve with HEAD [SVN r9444] --- include/boost/graph/adjacency_list.hpp | 47 ++++++++++---------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/include/boost/graph/adjacency_list.hpp b/include/boost/graph/adjacency_list.hpp index 041f3351..1bb70df4 100644 --- a/include/boost/graph/adjacency_list.hpp +++ b/include/boost/graph/adjacency_list.hpp @@ -26,13 +26,14 @@ #ifndef BOOST_GRAPH_ADJACENCY_LIST_HPP #define BOOST_GRAPH_ADJACENCY_LIST_HPP + +#include + #include #include #include #include -#include - #if !defined BOOST_NO_HASH #include #include @@ -43,6 +44,7 @@ #endif #include +#include #include #include #include @@ -252,23 +254,6 @@ namespace boost { } // namespace detail - //=========================================================================== - // Selectors for the Directed template parameter of adjacency_list. - - struct directedS { enum { is_directed = true, is_bidir = false }; - typedef true_type is_directed_t; - typedef false_type is_bidir_t; - }; - struct undirectedS { - enum { is_directed = false, is_bidir = false }; - typedef false_type is_directed_t; - typedef false_type is_bidir_t; - }; - struct bidirectionalS { - enum { is_directed = true, is_bidir = true }; - typedef true_type is_directed_t; - typedef true_type is_bidir_t; - }; //=========================================================================== // The adjacency_list_traits class, which provides a way to access @@ -354,15 +339,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, @@ -371,6 +359,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); @@ -382,13 +378,6 @@ namespace boost { GraphProperty m_property; }; - template - class graph_property { - public: - typedef typename property_value::type type; - }; - template inline typename graph_property, Tag>::type&