Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:37:38

0001 //
0002 //=======================================================================
0003 // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
0004 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
0005 //
0006 // Distributed under the Boost Software License, Version 1.0. (See
0007 // accompanying file LICENSE_1_0.txt or copy at
0008 // http://www.boost.org/LICENSE_1_0.txt)
0009 //=======================================================================
0010 //
0011 #ifndef BOOST_GRAPH_TRANSPOSE_HPP
0012 #define BOOST_GRAPH_TRANSPOSE_HPP
0013 
0014 #include <boost/config.hpp>
0015 #include <boost/graph/graph_traits.hpp>
0016 #include <boost/graph/reverse_graph.hpp>
0017 #include <boost/graph/copy.hpp>
0018 
0019 namespace boost
0020 {
0021 
0022 template < class VertexListGraph, class MutableGraph >
0023 void transpose_graph(const VertexListGraph& G, MutableGraph& G_T)
0024 {
0025     reverse_graph< VertexListGraph > R(G);
0026     copy_graph(R, G_T);
0027 }
0028 
0029 template < class VertexListGraph, class MutableGraph, class P, class T,
0030     class R >
0031 void transpose_graph(const VertexListGraph& G, MutableGraph& G_T,
0032     const bgl_named_params< P, T, R >& params)
0033 {
0034     reverse_graph< VertexListGraph > Rev(G);
0035     copy_graph(Rev, G_T, params);
0036 }
0037 
0038 } // namespace boost
0039 
0040 #endif // BOOST_GRAPH_TRANSPOSE_HPP