epoc32/include/stdapis/boost/graph/transpose_graph.hpp
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
//
williamr@2
     2
//=======================================================================
williamr@2
     3
// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
williamr@2
     4
// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
williamr@2
     5
//
williamr@2
     6
// Distributed under the Boost Software License, Version 1.0. (See
williamr@2
     7
// accompanying file LICENSE_1_0.txt or copy at
williamr@2
     8
// http://www.boost.org/LICENSE_1_0.txt)
williamr@2
     9
//=======================================================================
williamr@2
    10
//
williamr@2
    11
#ifndef BOOST_GRAPH_TRANSPOSE_HPP
williamr@2
    12
#define BOOST_GRAPH_TRANSPOSE_HPP
williamr@2
    13
williamr@2
    14
#include <boost/config.hpp>
williamr@2
    15
#include <boost/graph/graph_traits.hpp>
williamr@2
    16
#include <boost/graph/reverse_graph.hpp>
williamr@2
    17
#include <boost/graph/copy.hpp>
williamr@2
    18
williamr@2
    19
williamr@2
    20
namespace boost {
williamr@2
    21
williamr@2
    22
  template <class VertexListGraph, class MutableGraph> 
williamr@2
    23
  void transpose_graph(const VertexListGraph& G, MutableGraph& G_T)
williamr@2
    24
  {
williamr@2
    25
    reverse_graph<VertexListGraph> R(G);
williamr@2
    26
    copy_graph(R, G_T);
williamr@2
    27
  }
williamr@2
    28
  
williamr@2
    29
  template <class VertexListGraph, class MutableGraph, 
williamr@2
    30
    class P, class T, class R> 
williamr@2
    31
  void transpose_graph(const VertexListGraph& G, MutableGraph& G_T,
williamr@2
    32
                       const bgl_named_params<P, T, R>& params)
williamr@2
    33
  {
williamr@2
    34
    reverse_graph<VertexListGraph> Rev(G);
williamr@2
    35
    copy_graph(Rev, G_T, params);
williamr@2
    36
  }
williamr@2
    37
williamr@2
    38
} // namespace boost
williamr@2
    39
williamr@2
    40
#endif // BOOST_GRAPH_TRANSPOSE_HPP