author Peter Kovacs Mon, 12 Jan 2009 08:05:30 +0100 changeset 487 acfb0f24d178 parent 486 a2fd8b8d0b30 child 488 2b5496c62ccd
Rename Residual to ResidualDigraph (#67)
The new name is more analogous to other adaptor names.
 lemon/adaptors.h file | annotate | diff | comparison | revisions test/graph_adaptor_test.cc file | annotate | diff | comparison | revisions
     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.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.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

     2.1 --- a/test/graph_adaptor_test.cc	Mon Jan 12 07:52:48 2009 +0100
2.2 +++ b/test/graph_adaptor_test.cc	Mon Jan 12 08:05:30 2009 +0100
2.3 @@ -581,15 +581,15 @@
2.4    ea = a2;
2.5  }
2.6
2.7 -void checkResidual() {
2.8 +void checkResidualDigraph() {
2.9    // Check concepts
2.10 -  checkConcept<concepts::Digraph, Residual<concepts::Digraph> >();
2.11 -  checkConcept<concepts::Digraph, Residual<ListDigraph> >();
2.12 +  checkConcept<concepts::Digraph, ResidualDigraph<concepts::Digraph> >();
2.13 +  checkConcept<concepts::Digraph, ResidualDigraph<ListDigraph> >();
2.14
2.15    // Create a digraph and an adaptor
2.16    typedef ListDigraph Digraph;
2.17    typedef Digraph::ArcMap<int> IntArcMap;
2.18 -  typedef Residual<Digraph, IntArcMap> Adaptor;
2.19 +  typedef ResidualDigraph<Digraph, IntArcMap> Adaptor;
2.20
2.21    Digraph digraph;
2.22    IntArcMap capacity(digraph), flow(digraph);
2.23 @@ -1470,7 +1470,7 @@
2.24    checkFilterNodes1();
2.25    checkFilterArcs();
2.26    checkUndirector();
2.27 -  checkResidual();
2.28 +  checkResidualDigraph();
2.29    checkSplitNodes();
2.30
2.31    // Check the graph adaptors (using ListGraph)