lemon/preflow.h
changeset 780 580af8cf2f6a
parent 715 ece80147fb08
child 788 c92296660262
     1.1 --- a/lemon/preflow.h	Thu Nov 05 10:01:02 2009 +0100
     1.2 +++ b/lemon/preflow.h	Thu Nov 05 10:23:16 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 @@ -371,26 +379,28 @@
    1.45        return *_level;
    1.46      }
    1.47  
    1.48 -    /// \brief Sets the tolerance used by algorithm.
    1.49 +    /// \brief Sets the tolerance used by the algorithm.
    1.50      ///
    1.51 -    /// Sets the tolerance used by algorithm.
    1.52 -    Preflow& tolerance(const Tolerance& tolerance) const {
    1.53 +    /// Sets the tolerance object used by the algorithm.
    1.54 +    /// \return <tt>(*this)</tt>
    1.55 +    Preflow& tolerance(const Tolerance& tolerance) {
    1.56        _tolerance = tolerance;
    1.57        return *this;
    1.58      }
    1.59  
    1.60      /// \brief Returns a const reference to the tolerance.
    1.61      ///
    1.62 -    /// Returns a const reference to the tolerance.
    1.63 +    /// Returns a const reference to the tolerance object used by
    1.64 +    /// the algorithm.
    1.65      const Tolerance& tolerance() const {
    1.66 -      return tolerance;
    1.67 +      return _tolerance;
    1.68      }
    1.69  
    1.70      /// \name Execution Control
    1.71      /// The simplest way to execute the preflow algorithm is to use
    1.72      /// \ref run() or \ref runMinCut().\n
    1.73 -    /// If you need more control on the initial solution or the execution,
    1.74 -    /// first you have to call one of the \ref init() functions, then
    1.75 +    /// If you need better control on the initial solution or the execution,
    1.76 +    /// you have to call one of the \ref init() functions first, then
    1.77      /// \ref startFirstPhase() and if you need it \ref startSecondPhase().
    1.78  
    1.79      ///@{