epoc32/include/stdapis/boost/graph/reverse_graph.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h) This is the epoc32/include tree with the "platform" subtrees removed, and all but a selected few mbg and rsg files removed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
//  (C) Copyright David Abrahams 2000.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
// Distributed under the Boost Software License, Version 1.0. (See
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
// accompanying file LICENSE_1_0.txt or copy at
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
// http://www.boost.org/LICENSE_1_0.txt)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
#ifndef REVERSE_GRAPH_DWA092300_H_
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
# define REVERSE_GRAPH_DWA092300_H_
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
#include <boost/graph/adjacency_iterator.hpp>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
#include <boost/graph/properties.hpp>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
#include <boost/tuple/tuple.hpp>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
namespace boost {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
struct reverse_graph_tag { };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
  namespace detail {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
    template <bool isEdgeList> struct choose_rev_edge_iter { };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    20
    template <> struct choose_rev_edge_iter<true> {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
      template <class G> struct bind_ {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
        typedef typename graph_traits<G>::edge_iterator type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    23
      };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
    template <> struct choose_rev_edge_iter<false> {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
      template <class G> struct bind_ {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
        typedef void type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
      };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
  } // namespace detail
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    33
template <class BidirectionalGraph, class GraphRef = const BidirectionalGraph&>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    34
class reverse_graph {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    35
    typedef reverse_graph<BidirectionalGraph, GraphRef> Self;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    36
    typedef graph_traits<BidirectionalGraph> Traits;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
 public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    38
    typedef BidirectionalGraph base_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    39
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    40
    // Constructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    41
    reverse_graph(GraphRef g) : m_g(g) {}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    42
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    43
    // Graph requirements
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    44
    typedef typename Traits::vertex_descriptor vertex_descriptor;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    45
    typedef typename Traits::edge_descriptor edge_descriptor;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    46
    typedef typename Traits::directed_category directed_category;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    47
    typedef typename Traits::edge_parallel_category edge_parallel_category;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
    typedef typename Traits::traversal_category traversal_category;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    49
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
    // IncidenceGraph requirements
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
    typedef typename Traits::in_edge_iterator out_edge_iterator;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    52
    typedef typename Traits::degree_size_type degree_size_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    53
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
    // BidirectionalGraph requirements
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    55
    typedef typename Traits::out_edge_iterator in_edge_iterator;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    56
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    57
    // AdjacencyGraph requirements
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    58
  typedef typename adjacency_iterator_generator<Self,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    59
    vertex_descriptor, out_edge_iterator>::type adjacency_iterator;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    60
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    61
    // VertexListGraph requirements
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    62
    typedef typename Traits::vertex_iterator vertex_iterator;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    63
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    64
    // EdgeListGraph requirements
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    65
    enum { is_edge_list = is_convertible<traversal_category,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    66
           edge_list_graph_tag>::value };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    67
    typedef detail::choose_rev_edge_iter<is_edge_list> ChooseEdgeIter;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    68
    typedef typename ChooseEdgeIter::
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    69
      template bind_<BidirectionalGraph>::type   edge_iterator;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    70
    typedef typename Traits::vertices_size_type vertices_size_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    71
    typedef typename Traits::edges_size_type edges_size_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    72
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    73
    // More typedefs used by detail::edge_property_map, vertex_property_map
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    74
    typedef typename BidirectionalGraph::edge_property_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    75
      edge_property_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    76
    typedef typename BidirectionalGraph::vertex_property_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    77
      vertex_property_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    78
    typedef reverse_graph_tag graph_tag;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    79
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    80
#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    81
    // Bundled properties support
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    82
    template<typename Descriptor>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    83
    typename graph::detail::bundled_result<BidirectionalGraph, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    84
                                           Descriptor>::type&
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    85
    operator[](Descriptor x)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    86
    { return m_g[x]; }
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    87
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    88
    template<typename Descriptor>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    89
    typename graph::detail::bundled_result<BidirectionalGraph, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    90
                                           Descriptor>::type const&
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    91
    operator[](Descriptor x) const
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    92
    { return m_g[x]; }
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    93
#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    94
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    95
    static vertex_descriptor null_vertex()
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    96
    { return Traits::null_vertex(); }
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    97
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    98
    // would be private, but template friends aren't portable enough.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
    99
 // private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   100
    GraphRef m_g;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   101
};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   102
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   103
#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   104
  template<typename Graph, typename GraphRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   105
  struct vertex_bundle_type<reverse_graph<Graph, GraphRef> > 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   106
    : vertex_bundle_type<Graph> { };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   107
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   108
  template<typename Graph, typename GraphRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   109
  struct edge_bundle_type<reverse_graph<Graph, GraphRef> > 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   110
    : edge_bundle_type<Graph> { };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   111
#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   112
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   113
template <class BidirectionalGraph>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   114
inline reverse_graph<BidirectionalGraph>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   115
make_reverse_graph(const BidirectionalGraph& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   116
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   117
    return reverse_graph<BidirectionalGraph>(g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   118
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   119
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   120
template <class BidirectionalGraph>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   121
inline reverse_graph<BidirectionalGraph, BidirectionalGraph&>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   122
make_reverse_graph(BidirectionalGraph& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   123
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   124
    return reverse_graph<BidirectionalGraph, BidirectionalGraph&>(g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   125
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   126
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   127
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   128
std::pair<typename reverse_graph<BidirectionalGraph>::vertex_iterator,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   129
          typename reverse_graph<BidirectionalGraph>::vertex_iterator>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   130
vertices(const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   131
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   132
    return vertices(g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   133
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   134
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   135
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   136
std::pair<typename reverse_graph<BidirectionalGraph>::edge_iterator,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   137
          typename reverse_graph<BidirectionalGraph>::edge_iterator>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   138
edges(const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   139
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   140
    return edges(g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   141
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   142
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   143
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   144
inline std::pair<typename BidirectionalGraph::in_edge_iterator,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   145
                 typename BidirectionalGraph::in_edge_iterator>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   146
out_edges(const typename BidirectionalGraph::vertex_descriptor u,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   147
          const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   148
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   149
    return in_edges(u, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   150
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   151
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   152
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   153
inline typename BidirectionalGraph::vertices_size_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   154
num_vertices(const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   155
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   156
    return num_vertices(g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   157
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   158
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   159
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   160
inline typename reverse_graph<BidirectionalGraph>::edges_size_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   161
num_edges(const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   162
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   163
    return num_edges(g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   164
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   165
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   166
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   167
inline typename BidirectionalGraph::degree_size_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   168
out_degree(const typename BidirectionalGraph::vertex_descriptor u,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   169
           const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   170
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   171
    return in_degree(u, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   172
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   173
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   174
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   175
inline std::pair<typename BidirectionalGraph::edge_descriptor, bool>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   176
edge(const typename BidirectionalGraph::vertex_descriptor u,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   177
     const typename BidirectionalGraph::vertex_descriptor v,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   178
     const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   179
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   180
    return edge(v, u, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   181
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   182
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   183
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   184
inline std::pair<typename BidirectionalGraph::out_edge_iterator,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   185
    typename BidirectionalGraph::out_edge_iterator>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   186
in_edges(const typename BidirectionalGraph::vertex_descriptor u,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   187
         const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   188
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   189
    return out_edges(u, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   190
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   191
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   192
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   193
inline std::pair<typename reverse_graph<BidirectionalGraph,GRef>::adjacency_iterator,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   194
    typename reverse_graph<BidirectionalGraph,GRef>::adjacency_iterator>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   195
adjacent_vertices(const typename BidirectionalGraph::vertex_descriptor u,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   196
                  const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   197
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   198
    typedef reverse_graph<BidirectionalGraph,GRef> Graph;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   199
    typename Graph::out_edge_iterator first, last;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   200
    tie(first, last) = out_edges(u, g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   201
    typedef typename Graph::adjacency_iterator adjacency_iterator;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   202
    return std::make_pair(adjacency_iterator(first, const_cast<Graph*>(&g)),
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   203
                          adjacency_iterator(last, const_cast<Graph*>(&g)));
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   204
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   205
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   206
template <class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   207
inline typename BidirectionalGraph::degree_size_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   208
in_degree(const typename BidirectionalGraph::vertex_descriptor u,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   209
          const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   210
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   211
    return out_degree(u, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   212
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   213
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   214
template <class Edge, class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   215
inline typename graph_traits<BidirectionalGraph>::vertex_descriptor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   216
source(const Edge& e, const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   217
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   218
    return target(e, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   219
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   220
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   221
template <class Edge, class BidirectionalGraph, class GRef>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   222
inline typename graph_traits<BidirectionalGraph>::vertex_descriptor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   223
target(const Edge& e, const reverse_graph<BidirectionalGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   224
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   225
    return source(e, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   226
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   227
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   228
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   229
namespace detail {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   230
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   231
  struct reverse_graph_vertex_property_selector {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   232
    template <class ReverseGraph, class Property, class Tag>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   233
    struct bind_ {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   234
      typedef typename ReverseGraph::base_type Graph;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   235
      typedef property_map<Graph, Tag> PMap;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   236
      typedef typename PMap::type type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   237
      typedef typename PMap::const_type const_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   238
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   239
  };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   240
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   241
  struct reverse_graph_edge_property_selector {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   242
    template <class ReverseGraph, class Property, class Tag>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   243
    struct bind_ {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   244
      typedef typename ReverseGraph::base_type Graph;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   245
      typedef property_map<Graph, Tag> PMap;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   246
      typedef typename PMap::type type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   247
      typedef typename PMap::const_type const_type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   248
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   249
  };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   250
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   251
} // namespace detail
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   252
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   253
template <>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   254
struct vertex_property_selector<reverse_graph_tag> {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   255
  typedef detail::reverse_graph_vertex_property_selector type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   256
};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   257
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   258
template <>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   259
struct edge_property_selector<reverse_graph_tag> {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   260
  typedef detail::reverse_graph_edge_property_selector type;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   261
};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   262
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   263
template <class BidirGraph, class GRef, class Property>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   264
typename property_map<BidirGraph, Property>::type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   265
get(Property p, reverse_graph<BidirGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   266
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   267
  return get(p, g.m_g);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   268
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   269
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   270
template <class BidirGraph, class GRef, class Property>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   271
typename property_map<BidirGraph, Property>::const_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   272
get(Property p, const reverse_graph<BidirGraph,GRef>& g)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   273
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   274
  const BidirGraph& gref = g.m_g; // in case GRef is non-const
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   275
  return get(p, gref);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   276
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   277
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   278
template <class BidirectionalGraph, class GRef, class Property, class Key>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   279
typename property_traits<
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   280
  typename property_map<BidirectionalGraph, Property>::const_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   281
>::value_type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   282
get(Property p, const reverse_graph<BidirectionalGraph,GRef>& g, const Key& k)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   283
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   284
  return get(p, g.m_g, k);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   285
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   286
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   287
template <class BidirectionalGraph, class GRef, class Property, class Key, class Value>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   288
void
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   289
put(Property p, const reverse_graph<BidirectionalGraph,GRef>& g, const Key& k,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   290
    const Value& val)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   291
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   292
  put(p, g.m_g, k, val);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   293
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   294
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   295
template<typename BidirectionalGraph, typename GRef, typename Tag,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   296
         typename Value>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   297
inline void
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   298
set_property(const reverse_graph<BidirectionalGraph,GRef>& g, Tag tag, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   299
             const Value& value)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   300
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   301
  set_property(g.m_g, tag, value);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   302
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   303
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   304
template<typename BidirectionalGraph, typename GRef, typename Tag>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   305
inline
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   306
typename graph_property<BidirectionalGraph, Tag>::type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   307
get_property(const reverse_graph<BidirectionalGraph,GRef>& g, Tag tag)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   308
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   309
  return get_property(g.m_g, tag);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   310
}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   311
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   312
} // namespace boost
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   313
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff changeset
   314
#endif