File indexing completed on 2025-01-18 09:37:38
0001
0002
0003
0004
0005
0006
0007
0008
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 }
0039
0040 #endif