Changeset 2408:467ca6d16556 in lemon-0.x
- Timestamp:
- 03/13/07 16:42:06 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3239
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/hello_world.cc
r2391 r2408 25 25 /// \ref maps-page "maps". Click on the links to read more about these. 26 26 /// 27 /// \include hello_ lemon.cc27 /// \include hello_world.cc 28 28 29 29 #include <iostream> -
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 -
lemon/bellman_ford.h
r2394 r2408 39 39 /// 40 40 /// It defines all computational operations and constants which are 41 /// used in the bellman ford algorithm. The default implementation41 /// used in the Bellman-Ford algorithm. The default implementation 42 42 /// is based on the numeric_limits class. If the numeric type does not 43 43 /// have infinity value then the maximum value is used as extremal … … 101 101 typedef typename _LengthMap::Value Value; 102 102 103 /// \brief Operation traits for bellman-ford algorithm.103 /// \brief Operation traits for Bellman-Ford algorithm. 104 104 /// 105 105 /// It defines the infinity type on the given Value type … … 411 411 /// \brief Adds a new source node. 412 412 /// 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. 415 416 void addSource(Node source, Value dst = OperationTraits::zero()) { 416 417 _dist->set(source, dst); … … 421 422 } 422 423 423 /// \brief Executes one round from the bellman ford algorithm.424 /// \brief Executes one round from the Bellman-Ford algorithm. 424 425 /// 425 426 /// If the algoritm calculated the distances in the previous round … … 464 465 } 465 466 466 /// \brief Executes one weak round from the bellman ford algorithm.467 /// \brief Executes one weak round from the Bellman-Ford algorithm. 467 468 /// 468 469 /// If the algorithm calculated the distances in the … … 518 519 /// \pre init() must be called and at least one node should be added 519 520 /// with addSource() before using this function. If there is 520 /// a negative cycle sin the graph it gives back false.521 /// a negative cycle in the graph it gives back false. 521 522 /// 522 523 /// This method runs the %BellmanFord algorithm from the root node(s) … … 608 609 ///@{ 609 610 610 /// \brief Lemon iterator for get aactive nodes.611 /// \brief Lemon iterator for get the active nodes. 611 612 /// 612 613 /// Lemon iterator for get the active nodes. This class provides a … … 785 786 typedef typename _LengthMap::Value Value; 786 787 787 /// \brief Operation traits for bellman-ford algorithm.788 /// \brief Operation traits for Bellman-Ford algorithm. 788 789 /// 789 790 /// It defines the infinity type on the given Value type -
lemon/circulation.h
r2391 r2408 131 131 bool checkX() { return checkX(_x); } 132 132 133 ///Chec hif \c bar is a real barrier134 135 ///Chec hif \c bar is a real barrier133 ///Check if \c bar is a real barrier 134 135 ///Check if \c bar is a real barrier 136 136 ///\sa barrier() 137 137 template<class GT> … … 151 151 return _tol.negative(delta); 152 152 } 153 ///Chec hwhether or not the last execution provides a barrier154 155 ///Chec hwhether or not the last execution provides a barrier153 ///Check whether or not the last execution provides a barrier 154 155 ///Check whether or not the last execution provides a barrier 156 156 ///\sa barrier() 157 157 bool checkBarrier() -
lemon/graph_adaptor.h
r2392 r2408 1497 1497 ///\endcode 1498 1498 /// 1499 ///Then Re vGraphAdaptor implements the graph structure with node-set1499 ///Then ResGraphAdaptor implements the graph structure with node-set 1500 1500 /// \f$ V \f$ and edge-set \f$ A_{forward}\cup A_{backward} \f$, 1501 1501 ///where \f$ A_{forward}=\{uv : uv\in A, f(uv)<c(uv)\} \f$ and -
lemon/ssp_min_cost_flow.h
r2396 r2408 189 189 } 190 190 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. 193 192 void reset() { 194 193 total_length=0; -
lemon/time_measure.h
r2391 r2408 234 234 ///It is quite easy-to-use, here is a short example. 235 235 ///\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 /// } 254 254 ///\endcode 255 255 ///
Note: See TracChangeset
for help on using the changeset viewer.