Changeset 2408:467ca6d16556 in lemon-0.x for doc
- Timestamp:
- 03/13/07 16:42:06 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3239
- Location:
- doc
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/algorithms.dox
r2391 r2408 29 29 \subsection Bfs 30 30 The 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>31 The class has two template parameters: \b GR and \b TR.<br> 32 32 GR is the graph the algorithm runs on. It has \ref lemon::ListGraph "ListGraph" as default type. 33 33 TR is a Traits class commonly used to easy the parametrization of templates. In most cases you … … 52 52 Now the distances and path information are stored in maps which you can access with 53 53 member functions like \ref lemon::Bfs::distMap "distMap()" or \ref lemon::Bfs::predMap "predMap()".<br> 54 Or more directly w hit other member functions like \c predNode(). Once the algorithm54 Or more directly with other member functions like \ref lemon::Bfs::predNode "predNode()". Once the algorithm 55 55 is finished (or to be precise reached that node) \ref lemon::Bfs::dist "dist()" or \ref lemon::Bfs::predNode 56 56 "predNode()" can be called. … … 116 116 \until }; 117 117 The 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 'sprocessing just finished - into the beginning118 we need to do is insert the key - that is the node whose processing just finished - into the beginning 119 119 of the list.<br> 120 120 Although we implemented this needed helper class ourselves it was not necessary. -
doc/getting_started.dox
r2391 r2408 77 77 In the next few lines we add some more nodes and edges and to the graph we need. 78 78 Those 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.79 working program in file hello_world.cc in the demo section. 80 80 81 81 The next statement must be familiar. But what is that INVALID in the \c while -
doc/maps1.dox
r2391 r2408 35 35 To make easy to use them - especially as template parameters - there are <i>map concepts</i> like by graph classes. 36 36 <ul> 37 <li>\ref ReadMap - values can be re d out with the \c operator[].37 <li>\ref ReadMap - values can be read out with the \c operator[]. 38 38 \code value_typed_variable = map_instance[key_value]; \endcode 39 39 </li> … … 60 60 type. As an example, think of a edge-weighted directed graph. 61 61 \code ListGraph::EdgeMap<int> weight(graph); \endcode 62 You can see that the map needs the graph howsedges will mapped, but nothing more.62 You can see that the map needs the graph whose edges will mapped, but nothing more. 63 63 64 64 If the graph class is extendable or erasable the map will automatically follow -
doc/maps2.dox
r2391 r2408 43 43 typedef double Value; 44 44 typedef Graph::Edge Key; 45 double operator[]( Keye) const { return M_PI;}45 double operator[](const Key &e) const { return M_PI;} 46 46 }; 47 47 \endcode … … 52 52 struct MyMap : public MapBase<Graph::Edge,double> 53 53 { 54 Value operator[]( Keye) const { return M_PI;}54 Value operator[](const Key& e) const { return M_PI;} 55 55 }; 56 56 \endcode
Note: See TracChangeset
for help on using the changeset viewer.