diff --git a/doc/bibliography.html b/doc/bibliography.html
index b628bdb7..cc790060 100644
--- a/doc/bibliography.html
+++ b/doc/bibliography.html
@@ -332,26 +332,6 @@ Automata, Languages and Programming, 376-386, 1986
A Transitive Closure Algorithm
BIT, 10, 1970, pp. 76-94.
-
54
-Ulrik Brandes
-A
- Faster Algorithm for Betweenness Centrality
-Journal of Mathematical Sociology 25 (2):163-177, 2001.
-
-55
-Lindon C. Freeman
-A Set of Measures of Centrality Based on Betweenness
-Sociometry 40, pp. 35-41, 1977.
-
-56
-J.M. Anthonisse
-The rush in a directed graph.
-Technical Report BN9/71, Stichting Mahtematisch Centrum, Amsterdam, 1971.
-
-57
-T. Kamada and S. Kawai
-An algorithm for drawing general undirected graphs.
-Information Processing Letters, 31, pp. 7-15, 1989.
diff --git a/doc/table_of_contents.html b/doc/table_of_contents.html
index b8149c6c..7600778a 100644
--- a/doc/table_of_contents.html
+++ b/doc/table_of_contents.html
@@ -132,21 +132,21 @@
Graph Algorithms
- - Shortest Paths Algorithms
+
- Shortest Paths Algorithms
- - dijkstra_shortest_paths
-
- bellman_ford_shortest_paths
-
- dag_shortest_paths
-
- johnson_all_pairs_shortest_paths
+
- dijkstra_shortest_paths
+
- bellman_ford_shortest_paths
+
- dag_shortest_paths
+
- johnson_all_pairs_shortest_paths
- Minimum Spanning Tree Algorithms
-
- - kruskal_minimum_spanning_tree
-
- prim_minimum_spanning_tree
-
+
+ - kruskal_minimum_spanning_tree
+
- prim_minimum_spanning_tree
+
- connected_components
- strong_components
@@ -175,29 +175,17 @@
- sequential_vertex_coloring*
-
- minimum_degree_ordering
+
- minimum_degree_ordering
- sloan_ordering
- ith_wavefront, max_wavefront, aver_wavefront, and rms_wavefront
- - brandes_betweenness_centrality
- - Layout algorithms
-
- - circle_layout
- - kamada_kawai_spring_layout
-
-
- - Clustering algorithms
-
- - betweenness_centrality_clustering
-
-
AT&T Graphviz Read/Write Utilities
- - write_graphviz
-
- read_graphviz
-
+ write_graphviz
+ read_graphviz
+
Auxiliary Concepts, Classes, and Functions
@@ -207,8 +195,8 @@
- BasicMatrix
- incident
- opposite
-
- bandwidth
-
- ith_bandwidth
+
- bandwidth
+
- ith_bandwidth
- Tools for random graphs
- random_vertex
diff --git a/include/boost/graph/adjacency_iterator.hpp b/include/boost/graph/adjacency_iterator.hpp
deleted file mode 100644
index b5e8531a..00000000
--- a/include/boost/graph/adjacency_iterator.hpp
+++ /dev/null
@@ -1,116 +0,0 @@
-//=======================================================================
-// Copyright 2002 Indiana University.
-// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
-//
-// This file is part of the Boost Graph Library
-//
-// You should have received a copy of the License Agreement for the
-// Boost Graph Library along with the software; see the file LICENSE.
-//
-// Permission to modify the code and to distribute modified code is
-// granted, provided the text of this NOTICE is retained, a notice that
-// the code was modified is included with the above COPYRIGHT NOTICE and
-// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
-// file is distributed with the modified code.
-//
-// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
-// By way of example, but not limitation, Licensor MAKES NO
-// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
-// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
-// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
-// OR OTHER RIGHTS.
-//=======================================================================
-
-#ifndef BOOST_ADJACENCY_ITERATOR_HPP
-#define BOOST_ADJACENCY_ITERATOR_HPP
-
-#include
-#include
-
-namespace boost
-{
-
- template
- struct adjacency_iterator
- : iterator_adaptor<
- adjacency_iterator
- , OutEdgeIter
- , Vertex
- , use_default
- , Vertex
- , Difference
- >
- {
- typedef iterator_adaptor<
- adjacency_iterator
- , OutEdgeIter
- , Vertex
- , use_default
- , Vertex
- , Difference
- > super_t;
-
- inline adjacency_iterator() {}
- inline adjacency_iterator(OutEdgeIter const& i, const Graph* g) : super_t(i), m_g(g) { }
-
- inline Vertex
- dereference() const
- { return target(*this->base(), *m_g); }
-
- const Graph* m_g;
- };
-
- template ::vertex_descriptor,
- class OutEdgeIter=typename graph_traits::out_edge_iterator>
- class adjacency_iterator_generator
- {
- typedef typename boost::detail::iterator_traits
- ::difference_type difference_type;
- public:
- typedef adjacency_iterator type;
- };
-
- template
- struct inv_adjacency_iterator
- : iterator_adaptor<
- inv_adjacency_iterator
- , InEdgeIter
- , Vertex
- , use_default
- , Vertex
- , Difference
- >
- {
- typedef iterator_adaptor<
- inv_adjacency_iterator
- , InEdgeIter
- , Vertex
- , use_default
- , Vertex
- , Difference
- > super_t;
-
- inline inv_adjacency_iterator() { }
- inline inv_adjacency_iterator(InEdgeIter const& i, const Graph* g) : super_t(i), m_g(g) { }
-
- inline Vertex
- dereference() const
- { return source(*this->base(), *m_g); }
-
- const Graph* m_g;
- };
-
- template ::vertex_descriptor,
- class InEdgeIter = typename graph_traits::in_edge_iterator>
- class inv_adjacency_iterator_generator {
- typedef typename boost::detail::iterator_traits
- ::difference_type difference_type;
- public:
- typedef inv_adjacency_iterator type;
- };
-
-} // namespace boost
-
-#endif // BOOST_DETAIL_ADJACENCY_ITERATOR_HPP
diff --git a/include/boost/graph/adjacency_list.hpp b/include/boost/graph/adjacency_list.hpp
deleted file mode 100644
index d66e63e1..00000000
--- a/include/boost/graph/adjacency_list.hpp
+++ /dev/null
@@ -1,548 +0,0 @@
-//=======================================================================
-// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
-// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
-//
-// This file is part of the Boost Graph Library
-//
-// You should have received a copy of the License Agreement for the
-// Boost Graph Library along with the software; see the file LICENSE.
-// If not, contact Office of Research, University of Notre Dame, Notre
-// Dame, IN 46556.
-//
-// Permission to modify the code and to distribute modified code is
-// granted, provided the text of this NOTICE is retained, a notice that
-// the code was modified is included with the above COPYRIGHT NOTICE and
-// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
-// file is distributed with the modified code.
-//
-// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
-// By way of example, but not limitation, Licensor MAKES NO
-// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
-// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
-// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
-// OR OTHER RIGHTS.
-//=======================================================================
-
-#ifndef BOOST_GRAPH_ADJACENCY_LIST_HPP
-#define BOOST_GRAPH_ADJACENCY_LIST_HPP
-
-
-#include
-
-#include
-#include
-#include
-
-#if !defined BOOST_NO_HASH
-#include
-#endif
-
-#if !defined BOOST_NO_SLIST
-#include
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace boost {
-
- //===========================================================================
- // Selectors for the VertexList and EdgeList template parameters of
- // adjacency_list, and the container_gen traits class which is used
- // to map the selectors to the container type used to implement the
- // graph.
- //
- // The main container_gen traits class uses partial specialization,
- // so we also include a workaround.
-
-#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-#if !defined BOOST_NO_SLIST
- struct slistS {};
-#endif
-
- struct vecS { };
- struct listS { };
- struct setS { };
- struct multisetS { };
- struct mapS { };
-#if !defined BOOST_NO_HASH
- struct hash_mapS { };
- struct hash_setS { };
-#endif
-
- template
- struct container_gen { };
-
- template
- struct container_gen {
- typedef std::list type;
- };
-#if !defined BOOST_NO_SLIST
- template
- struct container_gen {
- typedef BOOST_STD_EXTENSION_NAMESPACE::slist type;
- };
-#endif
- template
- struct container_gen {
- typedef std::vector type;
- };
-
- template
- struct container_gen {
- typedef std::set type;
- };
-
- template
- struct container_gen {
- typedef std::set type;
- };
-
- template
- struct container_gen {
- typedef std::multiset type;
- };
-
-#if !defined BOOST_NO_HASH
- template
- struct container_gen {
- typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set type;
- };
-
- template
- struct container_gen {
- typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set type;
- };
-#endif
-
-#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-#if !defined BOOST_NO_SLIST
- struct slistS {
- template
- struct bind_ { typedef std::slist type; };
- };
-#endif
-
- struct vecS {
- template
- struct bind_ { typedef std::vector type; };
- };
-
- struct listS {
- template
- struct bind_ { typedef std::list type; };
- };
-
- struct setS {
- template
- struct bind_ { typedef std::set > type; };
- };
-
- struct multisetS {
- template
- struct bind_ { typedef std::multiset > type; };
- };
-
-#if !defined BOOST_NO_HASH
- struct hash_setS {
- template
- struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set > type; };
- };
-#endif
-
- struct mapS {
- template
- struct bind_ { typedef std::set > type; };
- };
-
-#if !defined BOOST_NO_HASH
- struct hash_mapS {
- template
- struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set > type; };
- };
-#endif
-
- template struct container_selector {
- typedef vecS type;
- };
-
-#define BOOST_CONTAINER_SELECTOR(NAME) \
- template <> struct container_selector { \
- typedef NAME type; \
- }
-
- BOOST_CONTAINER_SELECTOR(vecS);
- BOOST_CONTAINER_SELECTOR(listS);
- BOOST_CONTAINER_SELECTOR(mapS);
- BOOST_CONTAINER_SELECTOR(setS);
- BOOST_CONTAINER_SELECTOR(multisetS);
-#if !defined BOOST_NO_HASH
- BOOST_CONTAINER_SELECTOR(hash_mapS);
-#endif
-#if !defined BOOST_NO_SLIST
- BOOST_CONTAINER_SELECTOR(slistS);
-#endif
-
- template
- struct container_gen {
- typedef typename container_selector::type Select;
- typedef typename Select:: template bind_::type type;
- };
-
-#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
- template
- struct parallel_edge_traits { };
-
- template <>
- struct parallel_edge_traits {
- typedef allow_parallel_edge_tag type; };
-
- template <>
- struct parallel_edge_traits {
- typedef allow_parallel_edge_tag type; };
-
-#if !defined BOOST_NO_SLIST
- template <>
- struct parallel_edge_traits {
- typedef allow_parallel_edge_tag type; };
-#endif
-
- template <>
- struct parallel_edge_traits {
- typedef disallow_parallel_edge_tag type; };
-
- template <>
- struct parallel_edge_traits {
- typedef allow_parallel_edge_tag type; };
-
-#if !defined BOOST_NO_HASH
- template <>
- struct parallel_edge_traits {
- typedef disallow_parallel_edge_tag type;
- };
-#endif
-
- // mapS is obsolete, replaced with setS
- template <>
- struct parallel_edge_traits {
- typedef disallow_parallel_edge_tag type; };
-
-#if !defined BOOST_NO_HASH
- template <>
- struct parallel_edge_traits {
- typedef disallow_parallel_edge_tag type;
- };
-#endif
-
- namespace detail {
- template struct is_random_access {
- enum { value = false};
- typedef false_type type;
- };
- template <>
- struct is_random_access {
- enum { value = true };
- typedef true_type type;
- };
-
- } // namespace detail
-
-
-
- //===========================================================================
- // The adjacency_list_traits class, which provides a way to access
- // some of the associated types of an adjacency_list type without
- // having to first create the adjacency_list type. This is useful
- // when trying to create interior vertex or edge properties who's
- // value type is a vertex or edge descriptor.
-
- template
- struct adjacency_list_traits
- {
- typedef typename detail::is_random_access::type
- is_rand_access;
- typedef typename DirectedS::is_bidir_t is_bidir;
- typedef typename DirectedS::is_directed_t is_directed;
-
- typedef typename boost::ct_if_t::type
- >::type directed_category;
-
- typedef typename parallel_edge_traits::type
- edge_parallel_category;
-
- typedef void* vertex_ptr;
- typedef typename boost::ct_if_t::type vertex_descriptor;
- typedef detail::edge_desc_impl
- edge_descriptor;
- };
-
-} // namespace boost
-
-#include
-
-namespace boost {
-
- //===========================================================================
- // The adjacency_list class.
- //
-
- template
- class adjacency_list
- : public detail::adj_list_gen<
- adjacency_list,
- VertexListS, OutEdgeListS, DirectedS,
-#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
- typename detail::retag_property_list::type,
- typename detail::retag_property_list::type,
-#else
- VertexProperty, EdgeProperty,
-#endif
- GraphProperty, EdgeListS>::type
- {
-#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
- typedef typename detail::retag_property_list::retagged
- maybe_vertex_bundled;
-
- typedef typename detail::retag_property_list::retagged
- maybe_edge_bundled;
-#endif
-
- struct no_vertex_bundle {};
- struct no_edge_bundle {};
-
- public:
-#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
- typedef typename detail::retag_property_list::type
- vertex_property_type;
- typedef typename detail::retag_property_list::type
- edge_property_type;
-
- // The types that are actually bundled
- typedef typename ct_if<(is_same::value),
- no_vertex_bundle,
- maybe_vertex_bundled>::type vertex_bundled;
- typedef typename ct_if<(is_same::value),
- no_edge_bundle,
- maybe_edge_bundled>::type edge_bundled;
-#else
- typedef VertexProperty vertex_property_type;
- typedef EdgeProperty edge_property_type;
- typedef no_vertex_bundle vertex_bundled;
- typedef no_edge_bundle edge_bundled;
-#endif
-
- private:
- typedef adjacency_list self;
- typedef typename detail::adj_list_gen<
- self, VertexListS, OutEdgeListS, DirectedS,
- vertex_property_type, edge_property_type, GraphProperty, EdgeListS
- >::type Base;
-
- public:
- typedef typename Base::stored_vertex stored_vertex;
- typedef typename Base::vertices_size_type vertices_size_type;
- typedef typename Base::edges_size_type edges_size_type;
- typedef typename Base::degree_size_type degree_size_type;
- typedef typename Base::vertex_descriptor vertex_descriptor;
- typedef typename Base::edge_descriptor edge_descriptor;
-
- typedef GraphProperty graph_property_type;
-
- inline adjacency_list(const GraphProperty& p = GraphProperty())
- : m_property(p) { }
-
- inline adjacency_list(const adjacency_list& x)
- : Base(x), m_property(x.m_property) { }
-
- inline adjacency_list& operator=(const adjacency_list& x) {
- Base::operator=(x);
- m_property = x.m_property;
- return *this;
- }
-
- // Required by Mutable Graph
- inline adjacency_list(vertices_size_type num_vertices,
- const GraphProperty& p = GraphProperty())
- : Base(num_vertices), m_property(p) { }
-
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
- // Required by Iterator Constructible Graph
- template
- inline adjacency_list(EdgeIterator first, EdgeIterator last,
- vertices_size_type n,
- edges_size_type m = 0,
- const GraphProperty& p = GraphProperty())
- : Base(n, first, last), m_property(p) { }
-
- template
- inline adjacency_list(EdgeIterator first, EdgeIterator last,
- EdgePropertyIterator ep_iter,
- vertices_size_type n,
- edges_size_type m = 0,
- const GraphProperty& p = GraphProperty())
- : Base(n, first, last, ep_iter), m_property(p) { }
-#endif
-
- void swap(adjacency_list& x) {
- // Is there a more efficient way to do this?
- adjacency_list tmp(x);
- x = *this;
- *this = tmp;
- }
-
-#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
- // Directly access a vertex or edge bundle
- vertex_bundled& operator[](vertex_descriptor v)
- { return get(vertex_bundle, *this)[v]; }
-
- const vertex_bundled& operator[](vertex_descriptor v) const
- { return get(vertex_bundle, *this)[v]; }
-
- edge_bundled& operator[](edge_descriptor e)
- { return get(edge_bundle, *this)[e]; }
-
- const edge_bundled& operator[](edge_descriptor e) const
- { return get(edge_bundle, *this)[e]; }
-#endif
-
- // protected: (would be protected if friends were more portable)
- GraphProperty m_property;
- };
-
- template
- inline void
- set_property(adjacency_list& g, Tag,
- const Value& value) {
- get_property_value(g.m_property, Tag()) = value;;
- }
-
- template
- inline
- typename graph_property, Tag>::type&
- get_property(adjacency_list& g, Tag) {
- return get_property_value(g.m_property, Tag());
- }
-
- template
- inline
- const
- typename graph_property, Tag>::type&
- get_property(const adjacency_list& g, Tag) {
- return get_property_value(g.m_property, Tag());
- }
-
- // dwa 09/25/00 - needed to be more explicit so reverse_graph would work.
- template
- inline Vertex
- source(const detail::edge_base& e,
- const adjacency_list&)
- {
- return e.m_source;
- }
-
- template
- inline Vertex
- target(const detail::edge_base& e,
- const adjacency_list&)
- {
- return e.m_target;
- }
-
- // Support for bundled properties
-#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
- template
- inline
- typename property_map, T Bundle::*>::type
- get(T Bundle::* p, adjacency_list& g)
- {
- typedef typename property_map, T Bundle::*>::type
- result_type;
- return result_type(&g, p);
- }
-
- template
- inline
- typename property_map, T Bundle::*>::const_type
- get(T Bundle::* p, adjacency_list const & g)
- {
- typedef typename property_map, T Bundle::*>::const_type
- result_type;
- return result_type(&g, p);
- }
-
- template
- inline T
- get(T Bundle::* p, adjacency_list const & g, const Key& key)
- {
- return get(get(p, g), key);
- }
-
- template
- inline void
- put(T Bundle::* p, adjacency_list& g, const Key& key, const T& value)
- {
- put(get(p, g), key, value);
- }
-
-#endif
-
-
-} // namespace boost
-
-
-#endif // BOOST_GRAPH_ADJACENCY_LIST_HPP
diff --git a/include/boost/graph/adjacency_list_io.hpp b/include/boost/graph/adjacency_list_io.hpp
deleted file mode 100644
index 437f732d..00000000
--- a/include/boost/graph/adjacency_list_io.hpp
+++ /dev/null
@@ -1,375 +0,0 @@
-//=======================================================================
-// Copyright 2001 Universite Joseph Fourier, Grenoble.
-// Author: François Faure
-//
-// This file is part of the Boost Graph Library
-//
-// You should have received a copy of the License Agreement for the
-// Boost Graph Library along with the software; see the file LICENSE.
-// If not, contact Office of Research, University of Notre Dame, Notre
-// Dame, IN 46556.
-//
-// Permission to modify the code and to distribute modified code is
-// granted, provided the text of this NOTICE is retained, a notice that
-// the code was modified is included with the above COPYRIGHT NOTICE and
-// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
-// file is distributed with the modified code.
-//
-// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
-// By way of example, but not limitation, Licensor MAKES NO
-// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
-// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
-// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
-// OR OTHER RIGHTS.
-//=======================================================================
-
-
-#ifndef ______adj_list_io_______
-#define ______adj_list_io_______
-
-#include
-#include
-#include
-#include
-
-// Method read to parse an adjacency list from an input stream. Examples:
-// cin >> read( G );
-// cin >> read( G, NodePropertySubset(), EdgepropertySubset() );
-//
-// Method write to print an adjacency list to an output stream. Examples:
-// cout << write( G );
-// cout << write( G, NodePropertySubset(), EdgepropertySubset() );
-
-namespace boost {
-
-/* outline
- - basic property input
- - get property subset
- - graph parser
- - property printer
- - graph printer
- - user methods
-*/
-
-//===========================================================================
-// basic property input
-
-template
-std::istream& operator >> ( std::istream& in, property& p )
-{
- in >> p.m_value >> *(static_cast(&p)); // houpla !!
- return in;
-}
-
-template
-std::istream& operator >> ( std::istream& in, property& p )
-{
- in >> p.m_value;
- return in;
-}
-
-inline std::istream& operator >> ( std::istream& in, no_property& )
-{
- return in;
-}
-
-// basic property input
-//===========================================================================
-// get property subsets
-
-// get a single property tagged Stag
-template
-void get
-( property& p, const V& v, Stag s )
-{
- get( *(static_cast(&p)),v,s );
-}
-
-template
-void get
-( property& p, const V& v, Stag )
-{
- p.m_value = v;
-}
-
-// get a subset of properties tagged Stag
-template
-void getSubset
-( property& p, const property& s )
-{
- get( p, s.m_value, Stag() );
- getSubset( p, Snext(s) );
-}
-
-template
-void getSubset
-( property& p, const property& s )
-{
- get( p, s.m_value, Stag() );
-}
-
-inline void getSubset
-( no_property& p, const no_property& s )
-{
-}
-
-// get property subset
-//===========================================================================
-// graph parser
-
-template
-struct GraphParser
-{
-
- typedef Graph_t Graph;
-
- GraphParser( Graph* g ): graph(g)
- {}
-
- GraphParser& operator () ( std::istream& in )
- {
- typedef typename graph_traits::vertex_descriptor Vertex;
- std::vector nodes;
-
- typedef enum{ PARSE_NUM_NODES, PARSE_VERTEX, PARSE_EDGE } State;
- State state = PARSE_VERTEX;
-
- unsigned int numLine = 1;
- char c;
- while ( in.get(c) )
- {
- if( c== '#' ) skip(in);
- else if( c== 'n' ) state = PARSE_NUM_NODES;
- else if( c== 'v' ) state = PARSE_VERTEX;
- else if( c== 'e' ) state = PARSE_EDGE;
- else if( c== '\n' ) numLine++;
- else if( !std::isspace(c) ){
- in.putback(c);
- if( state == PARSE_VERTEX ){
- VertexPropertySubset readProp;
- if( in >> readProp )
- {
- VertexProperty vp;
- getSubset( vp, readProp );
- nodes.push_back( add_vertex(vp, *graph) );
- }
- else
- std::cerr<<"read vertex, parse error at line"<> source >> target;
- if( in >> readProp )
- {
- EdgeProperty ep;
- getSubset( ep, readProp );
- add_edge(nodes[source], nodes[target], ep, *graph);
- }
- else
- std::cerr<<"read edge, parse error at line"<> n ){
- for( int i=0; i
-struct PropertyPrinter
-{
- typedef typename Property::value_type Value;
- typedef typename Property::tag_type Tag;
- typedef typename Property::next_type Next;
-
- PropertyPrinter( Graph& g ):graph(&g){}
-
- template
- PropertyPrinter& operator () ( std::ostream& out, Iterator it )
- {
- typename property_map::type ps = get(Tag(), *graph);
- out << ps[ *it ] <<" ";
- PropertyPrinter print(*graph);
- print(out, it);
- return (*this);
- }
-private:
- Graph* graph;
-};
-template
-struct PropertyPrinter
-{
- PropertyPrinter( Graph& ){}
-
- template
- PropertyPrinter& operator () ( std::ostream&, Iterator it ){ return *this; }
-};
-
-// property printer
-//=========================================================================
-// graph printer
-
-template
-struct EdgePrinter
-{
-
- typedef Graph_t Graph;
- typedef typename graph_traits::vertex_descriptor Vertex;
-
- EdgePrinter( Graph& g )
- : graph(g)
- {}
-
- const EdgePrinter& operator () ( std::ostream& out ) const
- {
- // assign indices to vertices
- std::map indices;
- int num = 0;
- typename graph_traits::vertex_iterator vi;
- for (vi = vertices(graph).first; vi != vertices(graph).second; ++vi){
- indices[*vi] = num++;
- }
-
- // write edges
- PropertyPrinter print_Edge(graph);
- out << "e" << std::endl;
- typename graph_traits::edge_iterator ei;
- for (ei = edges(graph).first; ei != edges(graph).second; ++ei){
- out << indices[source(*ei,graph)] << " " << indices[target(*ei,graph)] << " ";
- print_Edge(out,ei);
- out << std::endl;
- }
- out << std::endl;
- return (*this);
- }
-
-protected:
-
- Graph& graph;
-
-};
-
-template
-struct GraphPrinter: public EdgePrinter
-{
- GraphPrinter( Graph& g )
- : EdgePrinter(g)
- {}
-
- const GraphPrinter& operator () ( std::ostream& out ) const
- {
- PropertyPrinter printNode(this->graph);
- out << "v"<::vertex_iterator vi;
- for (vi = vertices(this->graph).first; vi != vertices(this->graph).second; ++vi){
- printNode(out,vi);
- out << std::endl;
- }
-
- EdgePrinter::operator ()( out );
- return (*this);
- }
-};
-
-template
-struct GraphPrinter
- : public EdgePrinter
-{
- GraphPrinter( Graph& g )
- : EdgePrinter(g)
- {}
-
- const GraphPrinter& operator () ( std::ostream& out ) const
- {
- out << "n "<< num_vertices(this->graph) << std::endl;
- EdgePrinter::operator ()( out );
- return (*this);
- }
-};
-
-// graph printer
-//=========================================================================
-// user methods
-
-/// input stream for reading a graph
-template
-std::istream& operator >> ( std::istream& in, GraphParser gp )
-{
- gp(in);
- return in;
-}
-
-/// graph parser for given subsets of internal vertex and edge properties
-template
-GraphParser,VP,EP,VPS,EPS>
-read( adjacency_list& g, VPS vps, EPS eps )
-{
- return GraphParser,VP,EP,VPS,EPS>(&g);
-}
-
-/// graph parser for all internal vertex and edge properties
-template
-GraphParser,VP,EP,VP,EP>
-read( adjacency_list& g )
-{
- return GraphParser,VP,EP,VP,EP>(&g);
-}
-
-
-/// output stream for writing a graph
-template
-std::ostream& operator << ( std::ostream& out, const GraphPrinter& gp )
-{
- gp(out);
- return out;
-}
-
-/// write the graph with given property subsets
-template
-GraphPrinter,VPS,EPS>
-write( adjacency_list& g, VPS, EPS )
-{
- return GraphPrinter,VPS,EPS>(g);
-}
-
-/// write the graph with all internal vertex and edge properties
-template
-GraphPrinter,VP,EP>
-write( adjacency_list& g )
-{
- return GraphPrinter,VP,EP>(g);
-}
-
-// user methods
-//=========================================================================
-}// boost
-#endif
diff --git a/include/boost/graph/adjacency_matrix.hpp b/include/boost/graph/adjacency_matrix.hpp
deleted file mode 100644
index 8f5dddca..00000000
--- a/include/boost/graph/adjacency_matrix.hpp
+++ /dev/null
@@ -1,1082 +0,0 @@
-//=======================================================================
-// Copyright 2001 University of Notre Dame.
-// Author: Jeremy G. Siek
-//
-// This file is part of the Boost Graph Library
-//
-// You should have received a copy of the License Agreement for the
-// Boost Graph Library along with the software; see the file LICENSE.
-// If not, contact Office of Research, University of Notre Dame, Notre
-// Dame, IN 46556.
-//
-// Permission to modify the code and to distribute modified code is
-// granted, provided the text of this NOTICE is retained, a notice that
-// the code was modified is included with the above COPYRIGHT NOTICE and
-// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
-// file is distributed with the modified code.
-//
-// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
-// By way of example, but not limitation, Licensor MAKES NO
-// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
-// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
-// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
-// OR OTHER RIGHTS.
-//=======================================================================
-
-#ifndef BOOST_ADJACENCY_MATRIX_HPP
-#define BOOST_ADJACENCY_MATRIX_HPP
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace boost {
-
- namespace detail {
-
- template
- class matrix_edge_desc_impl : public edge_desc_impl
- {
- typedef edge_desc_impl Base;
- public:
- matrix_edge_desc_impl() { }
- matrix_edge_desc_impl(bool exists, Vertex s, Vertex d,
- const void* ep = 0)
- : Base(s, d, ep), m_exists(exists) { }
- bool exists() const { return m_exists; }
- private:
- bool m_exists;
- };
-
- struct does_edge_exist {
- template
- bool operator()(const Edge& e) const { return e.exists(); }
- };
-
- template
- bool get_edge_exists(const std::pair& stored_edge, int) {
- return stored_edge.first;
- }
- template
- void set_edge_exists(
- std::pair& stored_edge,
- bool flag,
- int
- ) {
- stored_edge.first = flag;
- }
-
- template
- bool get_edge_exists(const EdgeProxy& edge_proxy, ...) {
- return edge_proxy;
- }
- template
- EdgeProxy& set_edge_exists(EdgeProxy& edge_proxy, bool flag, ...) {
- edge_proxy = flag;
- return edge_proxy; // just to avoid never used warning
- }
-
-
-
- template
- const EdgeProperty&
- get_property(const std::pair& stored_edge) {
- return stored_edge.second;
- }
- template
- EdgeProperty&
- get_property(std::pair& stored_edge) {
- return stored_edge.second;
- }
-
- template
- inline void
- set_property(std::pair& stored_edge,
- const EdgeProperty& ep, int) {
- stored_edge.second = ep;
- }
-
- inline const no_property& get_property(const char&) {
- static no_property s_prop;
- return s_prop;
- }
- inline no_property& get_property(char&) {
- static no_property s_prop;
- return s_prop;
- }
- template
- inline void
- set_property(EdgeProxy, const EdgeProperty&, ...) {}
-
- //=======================================================================
- // Directed Out Edge Iterator
-
- template <
- typename VertexDescriptor, typename MatrixIter
- , typename VerticesSizeType, typename EdgeDescriptor
- >
- struct dir_adj_matrix_out_edge_iter
- : iterator_adaptor<
- dir_adj_matrix_out_edge_iter
- , MatrixIter
- , EdgeDescriptor
- , use_default
- , EdgeDescriptor
- , std::ptrdiff_t
- >
- {
- typedef iterator_adaptor<
- dir_adj_matrix_out_edge_iter
- , MatrixIter
- , EdgeDescriptor
- , use_default
- , EdgeDescriptor
- , std::ptrdiff_t
- > super_t;
-
- dir_adj_matrix_out_edge_iter() { }
-
- dir_adj_matrix_out_edge_iter(
- const MatrixIter& i
- , const VertexDescriptor& src
- , const VerticesSizeType& n
- )
- : super_t(i), m_src(src), m_targ(0), m_n(n)
- { }
-
- void increment() {
- ++this->base_reference();
- ++m_targ;
- }
-
- inline EdgeDescriptor
- dereference() const
- {
- return EdgeDescriptor(get_edge_exists(*this->base(), 0), m_src, m_targ,
- &get_property(*this->base()));
- }
- VertexDescriptor m_src, m_targ;
- VerticesSizeType m_n;
- };
-
- //=======================================================================
- // Undirected Out Edge Iterator
-
- template <
- typename VertexDescriptor, typename MatrixIter
- , typename VerticesSizeType, typename EdgeDescriptor
- >
- struct undir_adj_matrix_out_edge_iter
- : iterator_adaptor<
- undir_adj_matrix_out_edge_iter
- , MatrixIter
- , EdgeDescriptor
- , use_default
- , EdgeDescriptor
- , std::ptrdiff_t
- >
- {
- typedef iterator_adaptor<
- undir_adj_matrix_out_edge_iter
- , MatrixIter
- , EdgeDescriptor
- , use_default
- , EdgeDescriptor
- , std::ptrdiff_t
- > super_t;
-
- undir_adj_matrix_out_edge_iter() { }
-
- undir_adj_matrix_out_edge_iter(
- const MatrixIter& i
- , const VertexDescriptor& src
- , const VerticesSizeType& n
- )
- : super_t(i), m_src(src), m_inc(src), m_targ(0), m_n(n)
- {}
-
- void increment()
- {
- if (m_targ < m_src) // first half
- {
- ++this->base_reference();
- }
- else if (m_targ < m_n - 1)
- { // second half
- ++m_inc;
- this->base_reference() += m_inc;
- }
- else
- { // past-the-end
- this->base_reference() += m_n - m_src;
- }
- ++m_targ;
- }
-
- inline EdgeDescriptor
- dereference() const
- {
- return EdgeDescriptor(
- get_edge_exists(*this->base(), 0), m_src, m_targ
- , &get_property(*this->base())
- );
- }
-
- VertexDescriptor m_src, m_inc, m_targ;
- VerticesSizeType m_n;
- };
-
- //=======================================================================
- // Edge Iterator
-
- template
- struct adj_matrix_edge_iter
- : iterator_adaptor<
- adj_matrix_edge_iter
- , MatrixIter
- , EdgeDescriptor
- , use_default
- , EdgeDescriptor
- , std::ptrdiff_t
- >
- {
- typedef iterator_adaptor<
- adj_matrix_edge_iter
- , MatrixIter
- , EdgeDescriptor
- , use_default
- , EdgeDescriptor
- , std::ptrdiff_t
- > super_t;
-
- adj_matrix_edge_iter() { }
-
- adj_matrix_edge_iter(const MatrixIter& i, const MatrixIter& start, const VerticesSizeType& n)
- : super_t(i), m_start(start), m_src(0), m_targ(0), m_n(n) { }
-
- void increment()
- {
- increment_dispatch(this->base_reference(), Directed());
- }
-
- void increment_dispatch(MatrixIter& i, directedS)
- {
- ++i;
- if (m_targ == m_n - 1)
- {
- m_targ = 0;
- ++m_src;
- }
- else
- {
- ++m_targ;
- }
- }
-
- void increment_dispatch(MatrixIter& i, undirectedS)
- {
- ++i;
- if (m_targ == m_src)
- {
- m_targ = 0;
- ++m_src;
- }
- else
- {
- ++m_targ;
- }
- }
-
- inline EdgeDescriptor
- dereference() const
- {
- return EdgeDescriptor(
- get_edge_exists(
- *this->base(), 0), m_src, m_targ, &get_property(*this->base())
- );
- }
-
- MatrixIter m_start;
- VerticesSizeType m_src, m_targ, m_n;
- };
-
- } // namespace detail
-
- //=========================================================================
- // Adjacency Matrix Traits
- template
- class adjacency_matrix_traits {
- typedef typename Directed::is_bidir_t is_bidir;
- typedef typename Directed::is_directed_t is_directed;
- public:
- typedef typename boost::ct_if_t::type
- >::type directed_category;
-
- typedef disallow_parallel_edge_tag edge_parallel_category;
-
- typedef std::size_t vertex_descriptor;
-
- typedef detail::matrix_edge_desc_impl edge_descriptor;
- };
-
- struct adjacency_matrix_class_tag { };
-
- struct adj_matrix_traversal_tag :
- public virtual adjacency_matrix_tag,
- public virtual vertex_list_graph_tag,
- public virtual incidence_graph_tag,
- public virtual adjacency_graph_tag,
- public virtual edge_list_graph_tag { };
-
- //=========================================================================
- // Adjacency Matrix Class
- template >
- class adjacency_matrix {
- typedef adjacency_matrix self;
- typedef adjacency_matrix_traits Traits;
-
- struct no_vertex_bundle {};
- struct no_edge_bundle {};
- public:
-#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
- typedef typename detail::retag_property_list::type
- vertex_property_type;
- typedef typename detail::retag_property_list