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

Join ralf_grosse_kunstleve with HEAD

[SVN r9444]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-03-05 20:01:01 +00:00
parent 7efb7b957a
commit 6619f95046

View File

@@ -26,13 +26,14 @@
#ifndef BOOST_GRAPH_ADJACENCY_LIST_HPP
#define BOOST_GRAPH_ADJACENCY_LIST_HPP
#include <boost/config.hpp>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <boost/config.hpp>
#if !defined BOOST_NO_HASH
#include <hash_set>
#include <hash_map>
@@ -43,6 +44,7 @@
#endif
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/graph_selectors.hpp>
#include <boost/property_map.hpp>
#include <boost/pending/ct_if.hpp>
#include <boost/graph/detail/edge.hpp>
@@ -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 <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,
@@ -371,6 +359,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);
@@ -382,13 +378,6 @@ namespace boost {
GraphProperty m_property;
};
template <class Graph, class Property>
class graph_property {
public:
typedef typename property_value<typename Graph::graph_property_type,
Property>::type type;
};
template <class EL, class VL, class DS, class VP,class EP,class GP,class Tag>
inline
typename graph_property<adjacency_list<EL,VL,DS,VP,EP,GP>, Tag>::type&