# HG changeset patch # User alpar # Date 1173800526 0 # Node ID 467ca6d165566ba060e69d153d2d075a66122c88 # Parent fb2052c94ebd3882897894676225724b9342f6ee Doc improvements contributed by Peter Kovacs. diff -r fb2052c94ebd -r 467ca6d16556 demo/hello_world.cc --- a/demo/hello_world.cc Tue Mar 13 15:35:56 2007 +0000 +++ b/demo/hello_world.cc Tue Mar 13 15:42:06 2007 +0000 @@ -24,7 +24,7 @@ /// the very basic notions of the LEMON library: \ref graphs "graphs" and /// \ref maps-page "maps". Click on the links to read more about these. /// -/// \include hello_lemon.cc +/// \include hello_world.cc #include #include diff -r fb2052c94ebd -r 467ca6d16556 doc/algorithms.dox --- a/doc/algorithms.dox Tue Mar 13 15:35:56 2007 +0000 +++ b/doc/algorithms.dox Tue Mar 13 15:42:06 2007 +0000 @@ -28,7 +28,7 @@ \subsection Bfs The algorithm is implemented in the \ref lemon::Bfs "Bfs" template class - rather than as function. -The class has two template parameters: \b GR and \TR.
+The class has two template parameters: \b GR and \b TR.
GR is the graph the algorithm runs on. It has \ref lemon::ListGraph "ListGraph" as default type. TR is a Traits class commonly used to easy the parametrization of templates. In most cases you wont need to modify the default type \ref lemon::BfsDefaultTraits "BfsDefaultTraits". @@ -51,7 +51,7 @@ \endcode Now the distances and path information are stored in maps which you can access with member functions like \ref lemon::Bfs::distMap "distMap()" or \ref lemon::Bfs::predMap "predMap()".
-Or more directly whit other member functions like \c predNode(). Once the algorithm +Or more directly with other member functions like \ref lemon::Bfs::predNode "predNode()". Once the algorithm is finished (or to be precise reached that node) \ref lemon::Bfs::dist "dist()" or \ref lemon::Bfs::predNode "predNode()" can be called. @@ -115,7 +115,7 @@ \skip MyOrdererMap \until }; The class meets the \ref lemon::WriteMap "WriteMap" concept. In it's \c set() method the only thing -we need to do is insert the key - that is the node who's processing just finished - into the beginning +we need to do is insert the key - that is the node whose processing just finished - into the beginning of the list.
Although we implemented this needed helper class ourselves it was not necessary. The \ref lemon::FrontInserterBoolMap "FrontInserterBoolMap" class does exactly diff -r fb2052c94ebd -r 467ca6d16556 doc/getting_started.dox --- a/doc/getting_started.dox Tue Mar 13 15:35:56 2007 +0000 +++ b/doc/getting_started.dox Tue Mar 13 15:42:06 2007 +0000 @@ -76,7 +76,7 @@ In the next few lines we add some more nodes and edges and to the graph we need. Those lines are not very interesting so we skip them, but you find the whole -working program in file hello_lemon.cc in the demo section. +working program in file hello_world.cc in the demo section. The next statement must be familiar. But what is that INVALID in the \c while test statement? In LEMON we usually use the INVALID to check if an object diff -r fb2052c94ebd -r 467ca6d16556 doc/maps1.dox --- a/doc/maps1.dox Tue Mar 13 15:35:56 2007 +0000 +++ b/doc/maps1.dox Tue Mar 13 15:42:06 2007 +0000 @@ -34,7 +34,7 @@ To make easy to use them - especially as template parameters - there are map concepts like by graph classes.
    -
  • \ref ReadMap - values can be red out with the \c operator[]. +
  • \ref ReadMap - values can be read out with the \c operator[]. \code value_typed_variable = map_instance[key_value]; \endcode
  • \ref WriteMap - values can be set with the \c set() member function. @@ -59,7 +59,7 @@ If you want to assign data to nodes, just declare a NodeMap with the corresponding type. As an example, think of a edge-weighted directed graph. \code ListGraph::EdgeMap weight(graph); \endcode -You can see that the map needs the graph hows edges will mapped, but nothing more. +You can see that the map needs the graph whose edges will mapped, but nothing more. If the graph class is extendable or erasable the map will automatically follow the changes you make. If a new node is added a default value is mapped to it. diff -r fb2052c94ebd -r 467ca6d16556 doc/maps2.dox --- a/doc/maps2.dox Tue Mar 13 15:35:56 2007 +0000 +++ b/doc/maps2.dox Tue Mar 13 15:42:06 2007 +0000 @@ -42,7 +42,7 @@ { typedef double Value; typedef Graph::Edge Key; - double operator[](Key e) const { return M_PI;} + double operator[](const Key &e) const { return M_PI;} }; \endcode @@ -51,7 +51,7 @@ \code struct MyMap : public MapBase { - Value operator[](Key e) const { return M_PI;} + Value operator[](const Key& e) const { return M_PI;} }; \endcode diff -r fb2052c94ebd -r 467ca6d16556 lemon/bellman_ford.h --- a/lemon/bellman_ford.h Tue Mar 13 15:35:56 2007 +0000 +++ b/lemon/bellman_ford.h Tue Mar 13 15:42:06 2007 +0000 @@ -38,7 +38,7 @@ /// \brief Default OperationTraits for the BellmanFord algorithm class. /// /// It defines all computational operations and constants which are - /// used in the bellman ford algorithm. The default implementation + /// used in the Bellman-Ford algorithm. The default implementation /// is based on the numeric_limits class. If the numeric type does not /// have infinity value then the maximum value is used as extremal /// infinity value. @@ -100,7 +100,7 @@ // The type of the length of the edges. typedef typename _LengthMap::Value Value; - /// \brief Operation traits for bellman-ford algorithm. + /// \brief Operation traits for Bellman-Ford algorithm. /// /// It defines the infinity type on the given Value type /// and the used operation. @@ -410,8 +410,9 @@ /// \brief Adds a new source node. /// - /// The optional second parameter is the initial distance of the node. - /// It just sets the distance of the node to the given value. + /// Adds a new source node. The optional second parameter is the + /// initial distance of the node. It just sets the distance of the + /// node to the given value. void addSource(Node source, Value dst = OperationTraits::zero()) { _dist->set(source, dst); if (!(*_mask)[source]) { @@ -420,7 +421,7 @@ } } - /// \brief Executes one round from the bellman ford algorithm. + /// \brief Executes one round from the Bellman-Ford algorithm. /// /// If the algoritm calculated the distances in the previous round /// exactly for all at most \f$ k \f$ length path lengths then it will @@ -463,7 +464,7 @@ return _process.empty(); } - /// \brief Executes one weak round from the bellman ford algorithm. + /// \brief Executes one weak round from the Bellman-Ford algorithm. /// /// If the algorithm calculated the distances in the /// previous round at least for all at most k length paths then it will @@ -517,7 +518,7 @@ /// /// \pre init() must be called and at least one node should be added /// with addSource() before using this function. If there is - /// a negative cycles in the graph it gives back false. + /// a negative cycle in the graph it gives back false. /// /// This method runs the %BellmanFord algorithm from the root node(s) /// in order to compute the shortest path to each node. The algorithm @@ -607,7 +608,7 @@ ///@{ - /// \brief Lemon iterator for get a active nodes. + /// \brief Lemon iterator for get the active nodes. /// /// Lemon iterator for get the active nodes. This class provides a /// common style lemon iterator which gives back a subset of the @@ -784,7 +785,7 @@ /// \brief The value type of the length map. typedef typename _LengthMap::Value Value; - /// \brief Operation traits for bellman-ford algorithm. + /// \brief Operation traits for Bellman-Ford algorithm. /// /// It defines the infinity type on the given Value type /// and the used operation. diff -r fb2052c94ebd -r 467ca6d16556 lemon/circulation.h --- a/lemon/circulation.h Tue Mar 13 15:35:56 2007 +0000 +++ b/lemon/circulation.h Tue Mar 13 15:42:06 2007 +0000 @@ -130,9 +130,9 @@ ///Check if the default \c x is a feasible circulation bool checkX() { return checkX(_x); } - ///Chech if \c bar is a real barrier + ///Check if \c bar is a real barrier - ///Chech if \c bar is a real barrier + ///Check if \c bar is a real barrier ///\sa barrier() template bool checkBarrier(GT &bar) @@ -150,9 +150,9 @@ } return _tol.negative(delta); } - ///Chech whether or not the last execution provides a barrier + ///Check whether or not the last execution provides a barrier - ///Chech whether or not the last execution provides a barrier + ///Check whether or not the last execution provides a barrier ///\sa barrier() bool checkBarrier() { diff -r fb2052c94ebd -r 467ca6d16556 lemon/graph_adaptor.h --- a/lemon/graph_adaptor.h Tue Mar 13 15:35:56 2007 +0000 +++ b/lemon/graph_adaptor.h Tue Mar 13 15:42:06 2007 +0000 @@ -1496,7 +1496,7 @@ /// ListGraph g; ///\endcode /// - ///Then RevGraphAdaptor implements the graph structure with node-set + ///Then ResGraphAdaptor implements the graph structure with node-set /// \f$ V \f$ and edge-set \f$ A_{forward}\cup A_{backward} \f$, ///where \f$ A_{forward}=\{uv : uv\in A, f(uv)0\} \f$, i.e. the so called diff -r fb2052c94ebd -r 467ca6d16556 lemon/ssp_min_cost_flow.h --- a/lemon/ssp_min_cost_flow.h Tue Mar 13 15:35:56 2007 +0000 +++ b/lemon/ssp_min_cost_flow.h Tue Mar 13 15:42:06 2007 +0000 @@ -188,8 +188,7 @@ return flowValue(); } - /// \brief The class is reset to zero flow and potential. The - /// class is reset to zero flow and potential. + /// \brief The class is reset to zero flow and potential. void reset() { total_length=0; for (typename Graph::EdgeIt e(g); e!=INVALID; ++e) flow.set(e, 0); diff -r fb2052c94ebd -r 467ca6d16556 lemon/time_measure.h --- a/lemon/time_measure.h Tue Mar 13 15:35:56 2007 +0000 +++ b/lemon/time_measure.h Tue Mar 13 15:42:06 2007 +0000 @@ -233,24 +233,24 @@ ///Class for measuring the cpu time and real time usage of the process. ///It is quite easy-to-use, here is a short example. ///\code - ///#include - ///#include + /// #include + /// #include /// - ///int main() - ///{ + /// int main() + /// { /// - /// ... + /// ... /// - /// Timer T; - /// doSomething(); - /// std::cout << T << '\n'; - /// T.restart(); - /// doSomethingElse(); - /// std::cout << T << '\n'; + /// Timer T; + /// doSomething(); + /// std::cout << T << '\n'; + /// T.restart(); + /// doSomethingElse(); + /// std::cout << T << '\n'; /// - /// ... + /// ... /// - ///} + /// } ///\endcode /// ///The \ref Timer can also be \ref stop() "stopped" and