lemon/preflow.h
changeset 803 1b89e29c9fc7
parent 755 134852d7fb0a
parent 786 e20173729589
child 823 a7e93de12cbd
     1.1 --- a/lemon/preflow.h	Thu Dec 10 17:05:35 2009 +0100
     1.2 +++ b/lemon/preflow.h	Thu Dec 10 17:18:25 2009 +0100
     1.3 @@ -52,7 +52,11 @@
     1.4      ///
     1.5      /// The type of the map that stores the flow values.
     1.6      /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     1.7 +#ifdef DOXYGEN
     1.8 +    typedef GR::ArcMap<Value> FlowMap;
     1.9 +#else
    1.10      typedef typename Digraph::template ArcMap<Value> FlowMap;
    1.11 +#endif
    1.12  
    1.13      /// \brief Instantiates a FlowMap.
    1.14      ///
    1.15 @@ -67,9 +71,12 @@
    1.16      ///
    1.17      /// The elevator type used by Preflow algorithm.
    1.18      ///
    1.19 -    /// \sa Elevator
    1.20 -    /// \sa LinkedElevator
    1.21 -    typedef LinkedElevator<Digraph, typename Digraph::Node> Elevator;
    1.22 +    /// \sa Elevator, LinkedElevator
    1.23 +#ifdef DOXYGEN
    1.24 +    typedef lemon::Elevator<GR, GR::Node> Elevator;
    1.25 +#else
    1.26 +    typedef lemon::Elevator<Digraph, typename Digraph::Node> Elevator;
    1.27 +#endif
    1.28  
    1.29      /// \brief Instantiates an Elevator.
    1.30      ///
    1.31 @@ -95,9 +102,10 @@
    1.32    ///
    1.33    /// This class provides an implementation of Goldberg-Tarjan's \e preflow
    1.34    /// \e push-relabel algorithm producing a \ref max_flow
    1.35 -  /// "flow of maximum value" in a digraph.
    1.36 +  /// "flow of maximum value" in a digraph \ref clrs01algorithms,
    1.37 +  /// \ref amo93networkflows, \ref goldberg88newapproach.
    1.38    /// The preflow algorithms are the fastest known maximum
    1.39 -  /// flow algorithms. The current implementation use a mixture of the
    1.40 +  /// flow algorithms. The current implementation uses a mixture of the
    1.41    /// \e "highest label" and the \e "bound decrease" heuristics.
    1.42    /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{e})\f$.
    1.43    ///
    1.44 @@ -257,7 +265,7 @@
    1.45      /// The Elevator should have standard constructor interface to be
    1.46      /// able to automatically created by the algorithm (i.e. the
    1.47      /// digraph and the maximum level should be passed to it).
    1.48 -    /// However an external elevator object could also be passed to the
    1.49 +    /// However, an external elevator object could also be passed to the
    1.50      /// algorithm with the \ref elevator(Elevator&) "elevator()" function
    1.51      /// before calling \ref run() or \ref init().
    1.52      /// \sa SetElevator
    1.53 @@ -371,26 +379,28 @@
    1.54        return *_level;
    1.55      }
    1.56  
    1.57 -    /// \brief Sets the tolerance used by algorithm.
    1.58 +    /// \brief Sets the tolerance used by the algorithm.
    1.59      ///
    1.60 -    /// Sets the tolerance used by algorithm.
    1.61 -    Preflow& tolerance(const Tolerance& tolerance) const {
    1.62 +    /// Sets the tolerance object used by the algorithm.
    1.63 +    /// \return <tt>(*this)</tt>
    1.64 +    Preflow& tolerance(const Tolerance& tolerance) {
    1.65        _tolerance = tolerance;
    1.66        return *this;
    1.67      }
    1.68  
    1.69      /// \brief Returns a const reference to the tolerance.
    1.70      ///
    1.71 -    /// Returns a const reference to the tolerance.
    1.72 +    /// Returns a const reference to the tolerance object used by
    1.73 +    /// the algorithm.
    1.74      const Tolerance& tolerance() const {
    1.75 -      return tolerance;
    1.76 +      return _tolerance;
    1.77      }
    1.78  
    1.79      /// \name Execution Control
    1.80      /// The simplest way to execute the preflow algorithm is to use
    1.81      /// \ref run() or \ref runMinCut().\n
    1.82 -    /// If you need more control on the initial solution or the execution,
    1.83 -    /// first you have to call one of the \ref init() functions, then
    1.84 +    /// If you need better control on the initial solution or the execution,
    1.85 +    /// you have to call one of the \ref init() functions first, then
    1.86      /// \ref startFirstPhase() and if you need it \ref startSecondPhase().
    1.87  
    1.88      ///@{