lemon/circulation.h
changeset 942 2b6bffe0e7e8
parent 825 75e6020b19b1
child 964 7fdaa05a69a1
     1.1 --- a/lemon/circulation.h	Tue Dec 20 17:44:38 2011 +0100
     1.2 +++ b/lemon/circulation.h	Tue Dec 20 18:15:14 2011 +0100
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2009
     1.8 + * Copyright (C) 2003-2010
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -59,8 +59,8 @@
    1.13  
    1.14      /// \brief The type of supply map.
    1.15      ///
    1.16 -    /// The type of the map that stores the signed supply values of the 
    1.17 -    /// nodes. 
    1.18 +    /// The type of the map that stores the signed supply values of the
    1.19 +    /// nodes.
    1.20      /// It must conform to the \ref concepts::ReadMap "ReadMap" concept.
    1.21      typedef SM SupplyMap;
    1.22  
    1.23 @@ -72,7 +72,11 @@
    1.24      /// The type of the map that stores the flow values.
    1.25      /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap"
    1.26      /// concept.
    1.27 +#ifdef DOXYGEN
    1.28 +    typedef GR::ArcMap<Value> FlowMap;
    1.29 +#else
    1.30      typedef typename Digraph::template ArcMap<Value> FlowMap;
    1.31 +#endif
    1.32  
    1.33      /// \brief Instantiates a FlowMap.
    1.34      ///
    1.35 @@ -87,9 +91,12 @@
    1.36      ///
    1.37      /// The elevator type used by the algorithm.
    1.38      ///
    1.39 -    /// \sa Elevator
    1.40 -    /// \sa LinkedElevator
    1.41 +    /// \sa Elevator, LinkedElevator
    1.42 +#ifdef DOXYGEN
    1.43 +    typedef lemon::Elevator<GR, GR::Node> Elevator;
    1.44 +#else
    1.45      typedef lemon::Elevator<Digraph, typename Digraph::Node> Elevator;
    1.46 +#endif
    1.47  
    1.48      /// \brief Instantiates an Elevator.
    1.49      ///
    1.50 @@ -134,7 +141,7 @@
    1.51       \f[ \sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu)
    1.52       \geq sup(u) \quad \forall u\in V, \f]
    1.53       \f[ lower(uv) \leq f(uv) \leq upper(uv) \quad \forall uv\in A. \f]
    1.54 -     
    1.55 +
    1.56       The sum of the supply values, i.e. \f$\sum_{u\in V} sup(u)\f$ must be
    1.57       zero or negative in order to have a feasible solution (since the sum
    1.58       of the expressions on the left-hand side of the inequalities is zero).
    1.59 @@ -144,7 +151,7 @@
    1.60       If \f$\sum_{u\in V} sup(u)\f$ is zero, then all the supply/demand
    1.61       constraints have to be satisfied with equality, i.e. all demands
    1.62       have to be satisfied and all supplies have to be used.
    1.63 -     
    1.64 +
    1.65       If you need the opposite inequalities in the supply/demand constraints
    1.66       (i.e. the total demand is less than the total supply and all the demands
    1.67       have to be satisfied while there could be supplies that are not used),
    1.68 @@ -166,6 +173,11 @@
    1.69       The default map type is \c LM.
    1.70       \tparam SM The type of the supply map. The default map type is
    1.71       \ref concepts::Digraph::NodeMap "GR::NodeMap<UM::Value>".
    1.72 +     \tparam TR The traits class that defines various types used by the
    1.73 +     algorithm. By default, it is \ref CirculationDefaultTraits
    1.74 +     "CirculationDefaultTraits<GR, LM, UM, SM>".
    1.75 +     In most cases, this parameter should not be set directly,
    1.76 +     consider to use the named template parameters instead.
    1.77    */
    1.78  #ifdef DOXYGEN
    1.79  template< typename GR,
    1.80 @@ -299,7 +311,7 @@
    1.81      /// The Elevator should have standard constructor interface to be
    1.82      /// able to automatically created by the algorithm (i.e. the
    1.83      /// digraph and the maximum level should be passed to it).
    1.84 -    /// However an external elevator object could also be passed to the
    1.85 +    /// However, an external elevator object could also be passed to the
    1.86      /// algorithm with the \ref elevator(Elevator&) "elevator()" function
    1.87      /// before calling \ref run() or \ref init().
    1.88      /// \sa SetElevator
    1.89 @@ -325,7 +337,7 @@
    1.90      ///
    1.91      /// \param graph The digraph the algorithm runs on.
    1.92      /// \param lower The lower bounds for the flow values on the arcs.
    1.93 -    /// \param upper The upper bounds (capacities) for the flow values 
    1.94 +    /// \param upper The upper bounds (capacities) for the flow values
    1.95      /// on the arcs.
    1.96      /// \param supply The signed supply values of the nodes.
    1.97      Circulation(const Digraph &graph, const LowerMap &lower,
    1.98 @@ -450,9 +462,10 @@
    1.99        return *_level;
   1.100      }
   1.101  
   1.102 -    /// \brief Sets the tolerance used by algorithm.
   1.103 +    /// \brief Sets the tolerance used by the algorithm.
   1.104      ///
   1.105 -    /// Sets the tolerance used by algorithm.
   1.106 +    /// Sets the tolerance object used by the algorithm.
   1.107 +    /// \return <tt>(*this)</tt>
   1.108      Circulation& tolerance(const Tolerance& tolerance) {
   1.109        _tol = tolerance;
   1.110        return *this;
   1.111 @@ -460,15 +473,16 @@
   1.112  
   1.113      /// \brief Returns a const reference to the tolerance.
   1.114      ///
   1.115 -    /// Returns a const reference to the tolerance.
   1.116 +    /// Returns a const reference to the tolerance object used by
   1.117 +    /// the algorithm.
   1.118      const Tolerance& tolerance() const {
   1.119        return _tol;
   1.120      }
   1.121  
   1.122      /// \name Execution Control
   1.123      /// The simplest way to execute the algorithm is to call \ref run().\n
   1.124 -    /// If you need more control on the initial solution or the execution,
   1.125 -    /// first you have to call one of the \ref init() functions, then
   1.126 +    /// If you need better control on the initial solution or the execution,
   1.127 +    /// you have to call one of the \ref init() functions first, then
   1.128      /// the \ref start() function.
   1.129  
   1.130      ///@{