Changeset 1713:49d22d34d95f in lemon-0.x
- Timestamp:
- 10/06/05 12:28:45 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2240
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEWS
r1670 r1713 1 1 2005-??-?? Version 0.5 Released 2 * Changed namings: 3 - Access functions of TimeStamp/Timer 2 4 * Buxfix in 3 5 - DFS 4 6 - Preflow 5 7 6 8 2005-08-27 Version 0.4 Released 7 9 * List of new features and changes 8 * Changed naming :10 * Changed namings: 9 11 Wrapper -> Adaptor 10 12 kruskalEdgeMap() -> kruskal() -
doc/getstart.dox
r1640 r1713 149 149 \endverbatim 150 150 The directory where the GLPK header files are located. This is only useful when 151 the GLPK headers and libraries are not under the same prefix (which is not152 likely).151 the GLPK headers and libraries are not under the same prefix (which is 152 unlikely). 153 153 154 154 \verbatim … … 156 156 \endverbatim 157 157 The directory where the GLPK libraries are located. This is only useful when 158 the GLPK headers and libraries are not under the same prefix (which is not159 likely).158 the GLPK headers and libraries are not under the same prefix (which is 159 unlikely). 160 160 161 161 \verbatim … … 237 237 therefore iterating throuh its edges and nodes is fast. 238 238 239 After some convenien ttypedefs we create a graph and add three nodes to it.239 After some convenience typedefs we create a graph and add three nodes to it. 240 240 Then we add edges to it to form a complete graph. 241 241 … … 251 251 252 252 If your installation of LEMON into directory \c /usr/local was 253 successful then it is very easy to compile this program with the253 successful, then it is very easy to compile this program with the 254 254 following command (the argument <tt>-lemon</tt> tells the compiler 255 255 that we are using the installed library LEMON): -
doc/named-param.dox
r1709 r1713 22 22 23 23 \code 24 class named _fn24 class namedFn 25 25 { 26 26 int _id; … … 29 29 30 30 public: 31 named _fn() : _id(0), _val(1), _dim(2) {}32 named _fn& id(int p) { _id = p ; return *this; }33 named _fn& val(double p) { _val = p ; return *this; }34 named _fn& dim(int p) { _dim = p ; return *this; }31 namedFn() : _id(0), _val(1), _dim(2) {} 32 namedFn& id(int p) { _id = p ; return *this; } 33 namedFn& val(double p) { _val = p ; return *this; } 34 namedFn& dim(int p) { _dim = p ; return *this; } 35 35 36 36 run() { … … 43 43 The usage is the following. 44 44 45 We have to define a class, let's call it \c named _fn. Let us assume that46 we would like to use a parameter, called \c X. In the \c named _fn class we45 We have to define a class, let's call it \c namedFn. Let us assume that 46 we would like to use a parameter, called \c X. In the \c namedFn class we 47 47 have to define an \c _X attribute, and a function \c X. The function 48 48 expects a parameter with the type of \c _X, and sets the value of … … 56 56 attributes (originally the parameters), initially. If we call function 57 57 \c X, we get a class with the modified parameter value of 58 \c X. Therefore we can modify any parameter-value, independent from the58 \c X. Therefore we can modify any parameter-value, independently from the 59 59 order. To run the algorithm we have to call the <tt>run()</tt> function at the 60 60 end of the row. … … 62 62 Example: 63 63 \code 64 named _fn().id(3).val(2).run();64 namedFn().id(3).val(2).run(); 65 65 \endcode 66 67 \note Although it is a class, namedFn is used pretty much like as it were 68 a function. That it why it is called namedFn and not \c NamedFn. 69 70 \note In fact, the final <tt>.run()</tt> could be made unnecessary if the 71 actual function code were put in the destructor instead. This however would make 72 hard to implement functions with return values, and would also make the 73 implementation of \ref named-templ-func-param "named template parameters" 74 very problematic. Therefore, by convention, <tt>.run()</tt> is used 75 to explicitly execute function having named parameters in Lemon. 76 66 77 67 78 \section traits-classes Traits Classes
Note: See TracChangeset
for help on using the changeset viewer.