lemon/graph_adaptor.h
changeset 2037 32e4bebee616
parent 2034 b71f8ff62046
child 2042 bdc953f2a449
     1.1 --- a/lemon/graph_adaptor.h	Tue Apr 04 10:40:02 2006 +0000
     1.2 +++ b/lemon/graph_adaptor.h	Tue Apr 04 17:43:23 2006 +0000
     1.3 @@ -19,13 +19,13 @@
     1.4  #ifndef LEMON_GRAPH_ADAPTOR_H
     1.5  #define LEMON_GRAPH_ADAPTOR_H
     1.6  
     1.7 -/// \ingroup graph_adaptors
     1.8 -/// \file
     1.9 -/// \brief Several graph adaptors.
    1.10 +///\ingroup graph_adaptors
    1.11 +///\file
    1.12 +///\brief Several graph adaptors.
    1.13  ///
    1.14 -/// This file contains several useful graph adaptor functions.
    1.15 +///This file contains several useful graph adaptor functions.
    1.16  ///
    1.17 -/// \author Marton Makai and Balazs Dezso
    1.18 +///\author Marton Makai and Balazs Dezso
    1.19  
    1.20  #include <lemon/bits/invalid.h>
    1.21  #include <lemon/maps.h>
    1.22 @@ -74,9 +74,6 @@
    1.23    public:
    1.24      GraphAdaptorBase(Graph& _graph) : graph(&_graph) { }
    1.25  
    1.26 -    Graph& getGraph() { return *graph; }
    1.27 -    const Graph& getGraph() const { return *graph; }
    1.28 - 
    1.29      typedef typename Graph::Node Node;
    1.30      typedef typename Graph::Edge Edge;
    1.31     
    1.32 @@ -1479,39 +1476,39 @@
    1.33    
    1.34    ///\brief An adaptor for composing the residual
    1.35    ///graph for directed flow and circulation problems.
    1.36 +  ///
    1.37    ///\ingroup graph_adaptors
    1.38    ///
    1.39    ///An adaptor for composing the residual graph for
    1.40    ///directed flow and circulation problems. 
    1.41 -  ///Let \f$ G=(V, A) \f$ be a directed graph and let \f$ F \f$ be a 
    1.42 -  ///number type. Let moreover 
    1.43 -  ///\f$ f,c:A\to F \f$, be functions on the edge-set. 
    1.44 -  ///In the appications of ResGraphAdaptor, \f$ f \f$ usually stands for a flow 
    1.45 -  ///and \f$ c \f$ for a capacity function.   
    1.46 -  ///Suppose that a graph instange \c g of type 
    1.47 -  ///\c ListGraph implements \f$ G \f$.
    1.48 -  ///\code
    1.49 -  ///  ListGraph g;
    1.50 -  ///\endcode
    1.51 -  ///Then RevGraphAdaptor implements the graph structure with node-set 
    1.52 -  ///\f$ V \f$ and edge-set \f$ A_{forward}\cup A_{backward} \f$, where 
    1.53 -  ///\f$ A_{forward}=\{uv : uv\in A, f(uv)<c(uv)\} \f$ and 
    1.54 -  ///\f$ A_{backward}=\{vu : uv\in A, f(uv)>0\} \f$, 
    1.55 -  ///i.e. the so called residual graph. 
    1.56 -  ///When we take the union \f$ A_{forward}\cup A_{backward} \f$, 
    1.57 -  ///multilicities are counted, i.e. if an edge is in both 
    1.58 -  ///\f$ A_{forward} \f$ and \f$ A_{backward} \f$, then in the adaptor it 
    1.59 -  ///appears twice. 
    1.60 -  ///The following code shows how 
    1.61 -  ///such an instance can be constructed.
    1.62 -  ///\code
    1.63 -  ///typedef ListGraph Graph;
    1.64 -  ///Graph::EdgeMap<int> f(g);
    1.65 -  ///Graph::EdgeMap<int> c(g);
    1.66 -  ///ResGraphAdaptor<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > ga(g);
    1.67 -  ///\endcode
    1.68 -  ///\author Marton Makai
    1.69 -  ///
    1.70 +//   ///Let \f$ G=(V, A) \f$ be a directed graph and let \f$ F \f$ be a 
    1.71 +//   ///number type. Let moreover 
    1.72 +//   ///\f$ f,c:A\to F \f$, be functions on the edge-set. 
    1.73 +//   ///In the appications of ResGraphAdaptor, \f$ f \f$ usually stands for a 
    1.74 +//   ///flow and \f$ c \f$ for a capacity function.   
    1.75 +//   ///Suppose that a graph instange \c g of type 
    1.76 +//   ///\c ListGraph implements \f$ G \f$.
    1.77 +//   ///\code
    1.78 +//   /// ListGraph g;
    1.79 +//   ///\endcode
    1.80 +//   ///Then RevGraphAdaptor implements the graph structure with node-set 
    1.81 +//   ///\f$ V \f$ and edge-set \f$ A_{forward}\cup A_{backward} \f$, where 
    1.82 +//   ///\f$ A_{forward}=\{uv : uv\in A, f(uv)<c(uv)\} \f$ and 
    1.83 +//   ///\f$ A_{backward}=\{vu : uv\in A, f(uv)>0\} \f$, 
    1.84 +//   ///i.e. the so called residual graph. 
    1.85 +//   ///When we take the union \f$ A_{forward}\cup A_{backward} \f$, 
    1.86 +//   ///multilicities are counted, i.e. if an edge is in both 
    1.87 +//   ///\f$ A_{forward} \f$ and \f$ A_{backward} \f$, then in the adaptor it 
    1.88 +//   ///appears twice. The following code shows how such an instance can be 
    1.89 +//   ///constructed.
    1.90 +//   ///\code
    1.91 +//   /// typedef ListGraph Graph;
    1.92 +//   /// Graph::EdgeMap<int> f(g);
    1.93 +//   /// Graph::EdgeMap<int> c(g);
    1.94 +//   /// ResGraphAdaptor<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > ga(g);
    1.95 +//   ///\endcode
    1.96 +//   ///\author Marton Makai
    1.97 +//   ///
    1.98    template<typename Graph, typename Number, 
    1.99  	   typename CapacityMap, typename FlowMap,
   1.100             typename Tolerance = Tolerance<Number> >
   1.101 @@ -1561,8 +1558,6 @@
   1.102  
   1.103    public:
   1.104  
   1.105 -    const Graph& getGraph() const { return ugraph.getGraph(); }
   1.106 -
   1.107      /// \brief Constructor of the residual graph.
   1.108      ///
   1.109      /// Constructor of the residual graph. The parameters are the graph type,