COIN-OR::LEMON - Graph Library

Ticket #114: kruskal_doc_0c7c4dfacc8f.patch

File kruskal_doc_0c7c4dfacc8f.patch, 3.8 KB (added by Peter Kovacs, 16 years ago)
  • lemon/kruskal.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1215454246 -7200
    # Node ID 0c7c4dfacc8f86403fcc1cd77949975af9beebe8
    # Parent  65cba1032f90cd157a56b911b4917920b07fc546
    Doc improvements for kruskal()
    
    diff -r 65cba1032f90 -r 0c7c4dfacc8f lemon/kruskal.h
    a b  
    3232
    3333///\ingroup spantree
    3434///\file
    35 ///\brief Kruskal's algorithm to compute a minimum cost tree
     35///\brief Kruskal's algorithm to compute a minimum cost spanning tree
    3636///
    37 ///Kruskal's algorithm to compute a minimum cost tree.
     37///Kruskal's algorithm to compute a minimum cost spanning tree.
    3838///
    3939
    4040namespace lemon {
     
    251251
    252252  /// \ingroup spantree
    253253  ///
    254   /// \brief Kruskal's algorithm to find a minimum cost tree of a graph.
     254  /// \brief Kruskal algorithm to find a minimum cost spanning tree of
     255  /// a graph.
    255256  ///
    256   /// This function runs Kruskal's algorithm to find a minimum cost tree.
     257  /// This function runs Kruskal's algorithm to find a minimum cost
     258  /// spanning tree.
    257259  /// Due to some C++ hacking, it accepts various input and output types.
    258260  ///
    259261  /// \param g The graph the algorithm runs on.
     
    262264  /// If the graph is directed, the algorithm consider it to be
    263265  /// undirected by disregarding the direction of the arcs.
    264266  ///
    265   /// \param in This object is used to describe the arc costs. It can be one
    266   /// of the following choices.
     267  /// \param in This object is used to describe the arc/edge costs.
     268  /// It can be one of the following choices.
    267269  /// - An STL compatible 'Forward Container' with
    268   /// <tt>std::pair<GR::Edge,X></tt> or
    269   /// <tt>std::pair<GR::Arc,X></tt> as its <tt>value_type</tt>, where
    270   /// \c X is the type of the costs. The pairs indicates the arcs
     270  /// <tt>std::pair<GR::Arc,X></tt> or
     271  /// <tt>std::pair<GR::EdgeArc,X></tt> as its <tt>value_type</tt>, where
     272  /// \c X is the type of the costs. The pairs indicates the arcs/edges
    271273  /// along with the assigned cost. <em>They must be in a
    272274  /// cost-ascending order.</em>
    273   /// - Any readable Arc map. The values of the map indicate the arc costs.
     275  /// - Any readable arc/edge map. The values of the map indicate the
     276  /// arc/edge costs.
    274277  ///
    275   /// \retval out Here we also have a choise.
    276   /// - It can be a writable \c bool arc map. After running the
    277   /// algorithm this will contain the found minimum cost spanning
    278   /// tree: the value of an arc will be set to \c true if it belongs
     278  /// \retval out Here we also have a choice.
     279  /// - It can be a writable \c bool arc/edge map. After running the
     280  /// algorithm it will contain the found minimum cost spanning
     281  /// tree: the value of an arc/edge will be set to \c true if it belongs
    279282  /// to the tree, otherwise it will be set to \c false. The value of
    280   /// each arc will be set exactly once.
     283  /// each arc/edge will be set exactly once.
    281284  /// - It can also be an iteraror of an STL Container with
    282   /// <tt>GR::Edge</tt> or <tt>GR::Arc</tt> as its
     285  /// <tt>GR::Arc</tt> or <tt>GR::Edge</tt> as its
    283286  /// <tt>value_type</tt>.  The algorithm copies the elements of the
    284287  /// found tree into this sequence.  For example, if we know that the
    285288  /// spanning tree of the graph \c g has say 53 arcs, then we can
     
    290293  ///\endcode
    291294  /// Or if we don't know in advance the size of the tree, we can
    292295  /// write this. 
    293   ///\code std::vector<Arc> tree;
     296  ///\code
     297  /// std::vector<Arc> tree;
    294298  /// kruskal(g,cost,std::back_inserter(tree));
    295299  ///\endcode
    296300  ///
    297   /// \return The total cost of the found tree.
     301  /// \return The total cost of the found spanning tree.
    298302  ///
    299   /// \warning If kruskal runs on an be consistent of using the same
     303  /// \warning If Kruskal runs on an be consistent of using the same
    300304  /// Arc type for input and output.
    301305  ///
    302306