lemon/kruskal.h
changeset 802 994c7df296c9
parent 440 88ed40ad0d4f
     1.1 --- a/lemon/kruskal.h	Fri Nov 13 12:33:33 2009 +0100
     1.2 +++ b/lemon/kruskal.h	Thu Dec 10 17:05:35 2009 +0100
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2008
     1.8 + * Copyright (C) 2003-2009
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -248,11 +248,11 @@
    1.13  
    1.14    /// \ingroup spantree
    1.15    ///
    1.16 -  /// \brief Kruskal algorithm to find a minimum cost spanning tree of
    1.17 +  /// \brief Kruskal's algorithm for finding a minimum cost spanning tree of
    1.18    /// a graph.
    1.19    ///
    1.20    /// This function runs Kruskal's algorithm to find a minimum cost
    1.21 -  /// spanning tree.
    1.22 +  /// spanning tree of a graph.
    1.23    /// Due to some C++ hacking, it accepts various input and output types.
    1.24    ///
    1.25    /// \param g The graph the algorithm runs on.
    1.26 @@ -264,17 +264,17 @@
    1.27    /// \param in This object is used to describe the arc/edge costs.
    1.28    /// It can be one of the following choices.
    1.29    /// - An STL compatible 'Forward Container' with
    1.30 -  /// <tt>std::pair<GR::Arc,X></tt> or
    1.31 -  /// <tt>std::pair<GR::Edge,X></tt> as its <tt>value_type</tt>, where
    1.32 -  /// \c X is the type of the costs. The pairs indicates the arcs/edges
    1.33 +  /// <tt>std::pair<GR::Arc,C></tt> or
    1.34 +  /// <tt>std::pair<GR::Edge,C></tt> as its <tt>value_type</tt>, where
    1.35 +  /// \c C is the type of the costs. The pairs indicates the arcs/edges
    1.36    /// along with the assigned cost. <em>They must be in a
    1.37    /// cost-ascending order.</em>
    1.38    /// - Any readable arc/edge map. The values of the map indicate the
    1.39    /// arc/edge costs.
    1.40    ///
    1.41    /// \retval out Here we also have a choice.
    1.42 -  /// - It can be a writable \c bool arc/edge map. After running the
    1.43 -  /// algorithm it will contain the found minimum cost spanning
    1.44 +  /// - It can be a writable arc/edge map with \c bool value type. After
    1.45 +  /// running the algorithm it will contain the found minimum cost spanning
    1.46    /// tree: the value of an arc/edge will be set to \c true if it belongs
    1.47    /// to the tree, otherwise it will be set to \c false. The value of
    1.48    /// each arc/edge will be set exactly once.
    1.49 @@ -301,8 +301,8 @@
    1.50    /// forest is calculated instead of a spanning tree.
    1.51  
    1.52  #ifdef DOXYGEN
    1.53 -  template <class Graph, class In, class Out>
    1.54 -  Value kruskal(GR const& g, const In& in, Out& out)
    1.55 +  template <typename Graph, typename In, typename Out>
    1.56 +  Value kruskal(const Graph& g, const In& in, Out& out)
    1.57  #else
    1.58    template <class Graph, class In, class Out>
    1.59    inline typename _kruskal_bits::KruskalValueSelector<In>::Value
    1.60 @@ -314,8 +314,6 @@
    1.61    }
    1.62  
    1.63  
    1.64 -
    1.65 -
    1.66    template <class Graph, class In, class Out>
    1.67    inline typename _kruskal_bits::KruskalValueSelector<In>::Value
    1.68    kruskal(const Graph& graph, const In& in, const Out& out)