lemon/suurballe.h
changeset 559 c5fd2d996909
parent 519 c786cd201266
child 584 33c6b6e755cd
     1.1 --- a/lemon/suurballe.h	Thu Mar 05 10:13:20 2009 +0000
     1.2 +++ b/lemon/suurballe.h	Sun Mar 29 23:08:20 2009 +0200
     1.3 @@ -45,9 +45,9 @@
     1.4    /// In fact, this implementation is the specialization of the
     1.5    /// \ref CapacityScaling "successive shortest path" algorithm.
     1.6    ///
     1.7 -  /// \tparam Digraph The digraph type the algorithm runs on.
     1.8 +  /// \tparam GR The digraph type the algorithm runs on.
     1.9    /// The default value is \c ListDigraph.
    1.10 -  /// \tparam LengthMap The type of the length (cost) map.
    1.11 +  /// \tparam LEN The type of the length (cost) map.
    1.12    /// The default value is <tt>Digraph::ArcMap<int></tt>.
    1.13    ///
    1.14    /// \warning Length values should be \e non-negative \e integers.
    1.15 @@ -55,21 +55,26 @@
    1.16    /// \note For finding node-disjoint paths this algorithm can be used
    1.17    /// with \ref SplitNodes.
    1.18  #ifdef DOXYGEN
    1.19 -  template <typename Digraph, typename LengthMap>
    1.20 +  template <typename GR, typename LEN>
    1.21  #else
    1.22 -  template < typename Digraph = ListDigraph,
    1.23 -             typename LengthMap = typename Digraph::template ArcMap<int> >
    1.24 +  template < typename GR = ListDigraph,
    1.25 +             typename LEN = typename GR::template ArcMap<int> >
    1.26  #endif
    1.27    class Suurballe
    1.28    {
    1.29 -    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
    1.30 +    TEMPLATE_DIGRAPH_TYPEDEFS(GR);
    1.31  
    1.32 -    typedef typename LengthMap::Value Length;
    1.33      typedef ConstMap<Arc, int> ConstArcMap;
    1.34 -    typedef typename Digraph::template NodeMap<Arc> PredMap;
    1.35 +    typedef typename GR::template NodeMap<Arc> PredMap;
    1.36  
    1.37    public:
    1.38  
    1.39 +    /// The type of the digraph the algorithm runs on.
    1.40 +    typedef GR Digraph;
    1.41 +    /// The type of the length map.
    1.42 +    typedef LEN LengthMap;
    1.43 +    /// The type of the lengths.
    1.44 +    typedef typename LengthMap::Value Length;
    1.45      /// The type of the flow map.
    1.46      typedef typename Digraph::template ArcMap<int> FlowMap;
    1.47      /// The type of the potential map.
    1.48 @@ -256,7 +261,7 @@
    1.49      /// The found flow contains only 0 and 1 values. It is the union of
    1.50      /// the found arc-disjoint paths.
    1.51      ///
    1.52 -    /// \return \c (*this)
    1.53 +    /// \return <tt>(*this)</tt>
    1.54      Suurballe& flowMap(FlowMap &map) {
    1.55        if (_local_flow) {
    1.56          delete _flow;
    1.57 @@ -273,7 +278,7 @@
    1.58      /// The potentials provide the dual solution of the underlying
    1.59      /// minimum cost flow problem.
    1.60      ///
    1.61 -    /// \return \c (*this)
    1.62 +    /// \return <tt>(*this)</tt>
    1.63      Suurballe& potentialMap(PotentialMap &map) {
    1.64        if (_local_potential) {
    1.65          delete _potential;
    1.66 @@ -458,7 +463,7 @@
    1.67      /// \brief Return the total length (cost) of the found paths (flow).
    1.68      ///
    1.69      /// This function returns the total length (cost) of the found paths
    1.70 -    /// (flow). The complexity of the function is \f$ O(e) \f$.
    1.71 +    /// (flow). The complexity of the function is O(e).
    1.72      ///
    1.73      /// \pre \ref run() or \ref findFlow() must be called before using
    1.74      /// this function.