lemon/edmonds_karp.h
changeset 2059 ebf3b2962554
parent 2037 32e4bebee616
child 2113 48ec8161f9e1
     1.1 --- a/lemon/edmonds_karp.h	Tue Apr 18 07:01:55 2006 +0000
     1.2 +++ b/lemon/edmonds_karp.h	Tue Apr 18 07:02:32 2006 +0000
     1.3 @@ -41,10 +41,10 @@
     1.4    /// edges should be passed to the algorithm through the
     1.5    /// constructor.
     1.6    ///
     1.7 -  /// The time complexity of the algorithm is O(n * e^2) in worst case. 
     1.8 -  /// Always try the preflow algorithm instead of this if you does not
     1.9 -  /// have some additional reason than to compute the optimal flow which
    1.10 -  /// has O(n^3) time complexity.
    1.11 +  /// The time complexity of the algorithm is \f$ O(n * e^2) \f$ in
    1.12 +  /// worst case.  Always try the preflow algorithm instead of this if
    1.13 +  /// you does not have some additional reason than to compute the
    1.14 +  /// optimal flow which has \f$ O(n^3) \f$ time complexity.
    1.15    ///
    1.16    /// \param _Graph The directed graph type the algorithm runs on.
    1.17    /// \param _Number The number type of the capacities and the flow values.
    1.18 @@ -53,10 +53,15 @@
    1.19    /// \param _Tolerance The tolerance class to handle computation problems.
    1.20    ///
    1.21    /// \author Balazs Dezso 
    1.22 +#ifdef DOXYGEN
    1.23 +  template <typename _Graph, typename _Number,
    1.24 +	    typename _CapacityMap, typename _FlowMap, typename _Tolerance>
    1.25 +#else
    1.26    template <typename _Graph, typename _Number,
    1.27  	    typename _CapacityMap = typename _Graph::template EdgeMap<_Number>,
    1.28              typename _FlowMap = typename _Graph::template EdgeMap<_Number>,
    1.29  	    typename _Tolerance = Tolerance<_Number> >
    1.30 +#endif
    1.31    class EdmondsKarp {
    1.32    public:
    1.33  
    1.34 @@ -107,9 +112,6 @@
    1.35      /// \param capacity The capacity of the edges. 
    1.36      /// \param flow The flow of the edges. 
    1.37      /// \param tolerance Tolerance class.
    1.38 -    /// Except the graph, all of these parameters can be reset by
    1.39 -    /// calling \ref source, \ref target, \ref capacityMap and \ref
    1.40 -    /// flowMap, resp.
    1.41      EdmondsKarp(const Graph& graph, Node source, Node target,
    1.42                  const CapacityMap& capacity, FlowMap& flow, 
    1.43                  const Tolerance& tolerance = Tolerance())
    1.44 @@ -239,10 +241,11 @@
    1.45      /// \brief runs the algorithm.
    1.46      /// 
    1.47      /// It is just a shorthand for:
    1.48 -    /// \code 
    1.49 +    ///
    1.50 +    ///\code 
    1.51      /// ek.init();
    1.52      /// ek.start();
    1.53 -    /// \endcode
    1.54 +    ///\endcode
    1.55      void run() {
    1.56        init();
    1.57        start();