COIN-OR::LEMON - Graph Library

Changeset 2408:467ca6d16556 in lemon-0.x


Ignore:
Timestamp:
03/13/07 16:42:06 (17 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3239
Message:

Doc improvements contributed by Peter Kovacs.

Files:
10 edited

Legend:

Unmodified
Added
Removed
  • demo/hello_world.cc

    r2391 r2408  
    2525/// \ref maps-page "maps". Click on the links to read more about these.
    2626///
    27 /// \include hello_lemon.cc
     27/// \include hello_world.cc
    2828
    2929#include <iostream>
  • doc/algorithms.dox

    r2391 r2408  
    2929\subsection Bfs
    3030The algorithm is implemented in the \ref lemon::Bfs "Bfs" template class - rather than as function.
    31 The class has two template parameters: \b GR and \TR.<br>
     31The class has two template parameters: \b GR and \b TR.<br>
    3232GR is the graph the algorithm runs on. It has \ref lemon::ListGraph "ListGraph" as default type.
    3333TR is a Traits class commonly used to easy the parametrization of templates. In most cases you
     
    5252Now the distances and path information are stored in maps which you can access with
    5353member functions like \ref lemon::Bfs::distMap "distMap()" or \ref lemon::Bfs::predMap "predMap()".<br>
    54 Or more directly whit other member functions like \c predNode(). Once the algorithm
     54Or more directly with other member functions like \ref lemon::Bfs::predNode "predNode()". Once the algorithm
    5555is finished (or to be precise reached that node) \ref lemon::Bfs::dist "dist()" or \ref lemon::Bfs::predNode
    5656"predNode()" can be called.
     
    116116\until };
    117117The class meets the \ref lemon::WriteMap "WriteMap" concept. In it's \c set() method the only thing
    118 we need to do is insert the key - that is the node who's processing just finished - into the beginning
     118we need to do is insert the key - that is the node whose processing just finished - into the beginning
    119119of the list.<br>
    120120Although we implemented this needed helper class ourselves it was not necessary.
  • doc/getting_started.dox

    r2391 r2408  
    7777In the next few lines we add some more nodes and edges and to the graph we need.
    7878Those lines are not very interesting so we skip them, but you find the whole
    79 working program in file hello_lemon.cc in the demo section.
     79working program in file hello_world.cc in the demo section.
    8080
    8181The next statement must be familiar. But what is that INVALID in the \c while
  • doc/maps1.dox

    r2391 r2408  
    3535To make easy to use them - especially as template parameters - there are <i>map concepts</i> like by graph classes.
    3636<ul>
    37 <li>\ref ReadMap - values can be red out with the \c operator[].
     37<li>\ref ReadMap - values can be read out with the \c operator[].
    3838\code value_typed_variable = map_instance[key_value]; \endcode
    3939</li>
     
    6060type. As an example, think of a edge-weighted directed graph.
    6161\code ListGraph::EdgeMap<int>  weight(graph); \endcode
    62 You can see that the map needs the graph hows edges will mapped, but nothing more.
     62You can see that the map needs the graph whose edges will mapped, but nothing more.
    6363
    6464If the graph class is extendable or erasable the map will automatically follow
  • doc/maps2.dox

    r2391 r2408  
    4343  typedef double Value;
    4444  typedef Graph::Edge Key;
    45   double operator[](Key e) const { return M_PI;}
     45  double operator[](const Key &e) const { return M_PI;}
    4646};
    4747\endcode
     
    5252struct MyMap : public MapBase<Graph::Edge,double>
    5353{
    54   Value operator[](Key e) const { return M_PI;}
     54  Value operator[](const Key& e) const { return M_PI;}
    5555};
    5656\endcode
  • lemon/bellman_ford.h

    r2394 r2408  
    3939  /// 
    4040  /// It defines all computational operations and constants which are
    41   /// used in the bellman ford algorithm. The default implementation
     41  /// used in the Bellman-Ford algorithm. The default implementation
    4242  /// is based on the numeric_limits class. If the numeric type does not
    4343  /// have infinity value then the maximum value is used as extremal
     
    101101    typedef typename _LengthMap::Value Value;
    102102
    103     /// \brief Operation traits for bellman-ford algorithm.
     103    /// \brief Operation traits for Bellman-Ford algorithm.
    104104    ///
    105105    /// It defines the infinity type on the given Value type
     
    411411    /// \brief Adds a new source node.
    412412    ///
    413     /// The optional second parameter is the initial distance of the node.
    414     /// It just sets the distance of the node to the given value.
     413    /// Adds a new source node. The optional second parameter is the
     414    /// initial distance of the node. It just sets the distance of the
     415    /// node to the given value.
    415416    void addSource(Node source, Value dst = OperationTraits::zero()) {
    416417      _dist->set(source, dst);
     
    421422    }
    422423
    423     /// \brief Executes one round from the bellman ford algorithm.
     424    /// \brief Executes one round from the Bellman-Ford algorithm.
    424425    ///
    425426    /// If the algoritm calculated the distances in the previous round
     
    464465    }
    465466
    466     /// \brief Executes one weak round from the bellman ford algorithm.
     467    /// \brief Executes one weak round from the Bellman-Ford algorithm.
    467468    ///
    468469    /// If the algorithm calculated the distances in the
     
    518519    /// \pre init() must be called and at least one node should be added
    519520    /// with addSource() before using this function. If there is
    520     /// a negative cycles in the graph it gives back false.
     521    /// a negative cycle in the graph it gives back false.
    521522    ///
    522523    /// This method runs the %BellmanFord algorithm from the root node(s)
     
    608609    ///@{
    609610
    610     /// \brief Lemon iterator for get a active nodes.
     611    /// \brief Lemon iterator for get the active nodes.
    611612    ///
    612613    /// Lemon iterator for get the active nodes. This class provides a
     
    785786    typedef typename _LengthMap::Value Value;
    786787
    787     /// \brief Operation traits for bellman-ford algorithm.
     788    /// \brief Operation traits for Bellman-Ford algorithm.
    788789    ///
    789790    /// It defines the infinity type on the given Value type
  • lemon/circulation.h

    r2391 r2408  
    131131    bool checkX() { return checkX(_x); }
    132132
    133     ///Chech if \c bar is a real barrier
    134 
    135     ///Chech if \c bar is a real barrier
     133    ///Check if \c bar is a real barrier
     134
     135    ///Check if \c bar is a real barrier
    136136    ///\sa barrier()
    137137    template<class GT>
     
    151151      return _tol.negative(delta);
    152152    } 
    153     ///Chech whether or not the last execution provides a barrier
    154 
    155     ///Chech whether or not the last execution provides a barrier
     153    ///Check whether or not the last execution provides a barrier
     154
     155    ///Check whether or not the last execution provides a barrier
    156156    ///\sa barrier()
    157157    bool checkBarrier()
  • lemon/graph_adaptor.h

    r2392 r2408  
    14971497  ///\endcode
    14981498  ///
    1499   ///Then RevGraphAdaptor implements the graph structure with node-set
     1499  ///Then ResGraphAdaptor implements the graph structure with node-set
    15001500  /// \f$ V \f$ and edge-set \f$ A_{forward}\cup A_{backward} \f$,
    15011501  ///where \f$ A_{forward}=\{uv : uv\in A, f(uv)<c(uv)\} \f$ and
  • lemon/ssp_min_cost_flow.h

    r2396 r2408  
    189189    }
    190190
    191     /// \brief The class is reset to zero flow and potential. The
    192     /// class is reset to zero flow and potential.
     191    /// \brief The class is reset to zero flow and potential.
    193192    void reset() {
    194193      total_length=0;
  • lemon/time_measure.h

    r2391 r2408  
    234234  ///It is quite easy-to-use, here is a short example.
    235235  ///\code
    236   ///#include<lemon/time_measure.h>
    237   ///#include<iostream>
    238   ///
    239   ///int main()
    240   ///{
    241   ///
    242   ///  ...
    243   ///
    244   ///  Timer T;
    245   ///  doSomething();
    246   ///  std::cout << T << '\n';
    247   ///  T.restart();
    248   ///  doSomethingElse();
    249   ///  std::cout << T << '\n';
    250   ///
    251   ///  ...
    252   ///
    253   ///}
     236  /// #include<lemon/time_measure.h>
     237  /// #include<iostream>
     238  ///
     239  /// int main()
     240  /// {
     241  ///
     242  ///   ...
     243  ///
     244  ///   Timer T;
     245  ///   doSomething();
     246  ///   std::cout << T << '\n';
     247  ///   T.restart();
     248  ///   doSomethingElse();
     249  ///   std::cout << T << '\n';
     250  ///
     251  ///   ...
     252  ///
     253  /// }
    254254  ///\endcode
    255255  ///
Note: See TracChangeset for help on using the changeset viewer.