# Changeset 2408:467ca6d16556 in lemon-0.x

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

Doc improvements contributed by Peter Kovacs.

Files:
10 edited

Unmodified
Removed
• ## demo/hello_world.cc

 r2391 /// \ref maps-page "maps". Click on the links to read more about these. /// /// \include hello_lemon.cc /// \include hello_world.cc #include
• ## doc/algorithms.dox

 r2391 \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 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. \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.
• ## doc/getting_started.dox

 r2391 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
• ## doc/maps1.dox

 r2391 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
• 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
• ## doc/maps2.dox

 r2391 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 struct MyMap : public MapBase { Value operator[](Key e) const { return M_PI;} Value operator[](const Key& e) const { return M_PI;} }; \endcode
• ## lemon/bellman_ford.h

 r2394 /// /// 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 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 /// \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); } /// \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 } /// \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 /// \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) ///@{ /// \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 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
• ## lemon/circulation.h

 r2391 bool checkX() { return checkX(_x); } ///Chech if \c bar is a real barrier ///Chech if \c bar is a real barrier ///Check if \c bar is a real barrier ///Check if \c bar is a real barrier ///\sa barrier() template return _tol.negative(delta); } ///Chech 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 ///Check whether or not the last execution provides a barrier ///\sa barrier() bool checkBarrier()
 r2392 ///\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)