lemon/adaptors.h
changeset 464 acfb0f24d178
parent 455 5a1e9fdcfd3a
child 512 9b9ffe7d9b75
     1.1 --- a/lemon/adaptors.h	Mon Jan 12 07:52:48 2009 +0100
     1.2 +++ b/lemon/adaptors.h	Mon Jan 12 08:05:30 2009 +0100
     1.3 @@ -2666,10 +2666,10 @@
     1.4    /// \brief Adaptor class for composing the residual digraph for directed
     1.5    /// flow and circulation problems.
     1.6    ///
     1.7 -  /// Residual can be used for composing the \e residual digraph for directed
     1.8 -  /// flow and circulation problems. Let \f$ G=(V, A) \f$ be a directed graph
     1.9 -  /// and let \f$ F \f$ be a number type. Let \f$ flow, cap: A\to F \f$ be
    1.10 -  /// functions on the arcs.
    1.11 +  /// ResidualDigraph can be used for composing the \e residual digraph
    1.12 +  /// for directed flow and circulation problems. Let \f$ G=(V, A) \f$
    1.13 +  /// be a directed graph and let \f$ F \f$ be a number type.
    1.14 +  /// Let \f$ flow, cap: A\to F \f$ be functions on the arcs.
    1.15    /// This adaptor implements a digraph structure with node set \f$ V \f$
    1.16    /// and arc set \f$ A_{forward}\cup A_{backward} \f$,
    1.17    /// where \f$ A_{forward}=\{uv : uv\in A, flow(uv)<cap(uv)\} \f$ and
    1.18 @@ -2704,13 +2704,13 @@
    1.19    /// is convertible to the \c Arc type of the adapted digraph.
    1.20  #ifdef DOXYGEN
    1.21    template<typename GR, typename CM, typename FM, typename TL>
    1.22 -  class Residual
    1.23 +  class ResidualDigraph
    1.24  #else
    1.25    template<typename GR,
    1.26             typename CM = typename GR::template ArcMap<int>,
    1.27             typename FM = CM,
    1.28             typename TL = Tolerance<typename CM::Value> >
    1.29 -  class Residual :
    1.30 +  class ResidualDigraph :
    1.31      public FilterArcs<
    1.32        Undirector<const GR>,
    1.33        typename Undirector<const GR>::template CombinedArcMap<
    1.34 @@ -2730,7 +2730,7 @@
    1.35      typedef TL Tolerance;
    1.36  
    1.37      typedef typename CapacityMap::Value Value;
    1.38 -    typedef Residual Adaptor;
    1.39 +    typedef ResidualDigraph Adaptor;
    1.40  
    1.41    protected:
    1.42  
    1.43 @@ -2761,8 +2761,8 @@
    1.44      ///
    1.45      /// Constructor of the residual digraph adaptor. The parameters are the
    1.46      /// digraph, the capacity map, the flow map, and a tolerance object.
    1.47 -    Residual(const Digraph& digraph, const CapacityMap& capacity,
    1.48 -             FlowMap& flow, const Tolerance& tolerance = Tolerance())
    1.49 +    ResidualDigraph(const Digraph& digraph, const CapacityMap& capacity,
    1.50 +                    FlowMap& flow, const Tolerance& tolerance = Tolerance())
    1.51        : Parent(), _capacity(&capacity), _flow(&flow), _graph(digraph),
    1.52          _forward_filter(capacity, flow, tolerance),
    1.53          _backward_filter(capacity, flow, tolerance),
    1.54 @@ -2869,10 +2869,9 @@
    1.55    /// \ingroup graph_adaptors
    1.56    /// \relates Residual
    1.57    template<typename GR, typename CM, typename FM>
    1.58 -  Residual<GR, CM, FM> residual(const GR& digraph,
    1.59 -                                const CM& capacity_map,
    1.60 -                                FM& flow_map) {
    1.61 -    return Residual<GR, CM, FM> (digraph, capacity_map, flow_map);
    1.62 +  ResidualDigraph<GR, CM, FM>
    1.63 +  residualDigraph(const GR& digraph, const CM& capacity_map, FM& flow_map) {
    1.64 +    return ResidualDigraph<GR, CM, FM> (digraph, capacity_map, flow_map);
    1.65    }
    1.66  
    1.67