lemon/preflow.h
changeset 742 8e68671af789
parent 713 4ac30454f1c1
parent 689 86c49553fea5
child 755 134852d7fb0a
child 786 e20173729589
     1.1 --- a/lemon/preflow.h	Wed Sep 30 08:36:43 2009 +0200
     1.2 +++ b/lemon/preflow.h	Wed Sep 30 08:41:06 2009 +0200
     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 @@ -97,7 +104,7 @@
    1.32    /// \e push-relabel algorithm producing a \ref max_flow
    1.33    /// "flow of maximum value" in a digraph.
    1.34    /// The preflow algorithms are the fastest known maximum
    1.35 -  /// flow algorithms. The current implementation use a mixture of the
    1.36 +  /// flow algorithms. The current implementation uses a mixture of the
    1.37    /// \e "highest label" and the \e "bound decrease" heuristics.
    1.38    /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{e})\f$.
    1.39    ///
    1.40 @@ -371,26 +378,28 @@
    1.41        return *_level;
    1.42      }
    1.43  
    1.44 -    /// \brief Sets the tolerance used by algorithm.
    1.45 +    /// \brief Sets the tolerance used by the algorithm.
    1.46      ///
    1.47 -    /// Sets the tolerance used by algorithm.
    1.48 -    Preflow& tolerance(const Tolerance& tolerance) const {
    1.49 +    /// Sets the tolerance object used by the algorithm.
    1.50 +    /// \return <tt>(*this)</tt>
    1.51 +    Preflow& tolerance(const Tolerance& tolerance) {
    1.52        _tolerance = tolerance;
    1.53        return *this;
    1.54      }
    1.55  
    1.56      /// \brief Returns a const reference to the tolerance.
    1.57      ///
    1.58 -    /// Returns a const reference to the tolerance.
    1.59 +    /// Returns a const reference to the tolerance object used by
    1.60 +    /// the algorithm.
    1.61      const Tolerance& tolerance() const {
    1.62 -      return tolerance;
    1.63 +      return _tolerance;
    1.64      }
    1.65  
    1.66      /// \name Execution Control
    1.67      /// The simplest way to execute the preflow algorithm is to use
    1.68      /// \ref run() or \ref runMinCut().\n
    1.69 -    /// If you need more control on the initial solution or the execution,
    1.70 -    /// first you have to call one of the \ref init() functions, then
    1.71 +    /// If you need better control on the initial solution or the execution,
    1.72 +    /// you have to call one of the \ref init() functions first, then
    1.73      /// \ref startFirstPhase() and if you need it \ref startSecondPhase().
    1.74  
    1.75      ///@{