First public contribution.
2 //=======================================================================
3 // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
4 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
6 // Distributed under the Boost Software License, Version 1.0. (See
7 // accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //=======================================================================
11 #ifndef BOOST_GRAPH_TRANSPOSE_HPP
12 #define BOOST_GRAPH_TRANSPOSE_HPP
14 #include <boost/config.hpp>
15 #include <boost/graph/graph_traits.hpp>
16 #include <boost/graph/reverse_graph.hpp>
17 #include <boost/graph/copy.hpp>
22 template <class VertexListGraph, class MutableGraph>
23 void transpose_graph(const VertexListGraph& G, MutableGraph& G_T)
25 reverse_graph<VertexListGraph> R(G);
29 template <class VertexListGraph, class MutableGraph,
30 class P, class T, class R>
31 void transpose_graph(const VertexListGraph& G, MutableGraph& G_T,
32 const bgl_named_params<P, T, R>& params)
34 reverse_graph<VertexListGraph> Rev(G);
35 copy_graph(Rev, G_T, params);
40 #endif // BOOST_GRAPH_TRANSPOSE_HPP