Changeset 1624:61cc647dac99 in lemon-0.x
- Timestamp:
- 08/11/05 16:31:06 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2132
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/named-param.dox
r1619 r1624 1 *!1 /*! 2 2 3 3 \page named-param Named Parameters 4 4 5 \section named-func-param Named "Function"Parameters5 \section named-func-param Named Function Parameters 6 6 7 7 C++ makes it possible to use default parameter values when calling a … … 43 43 The usage is the following. 44 44 45 We have to define a class, let's call it named_fn. Let us assume that46 we would like to use a parameter, called X. In thenamed_fn class we47 have to define an _X attribute, and a functionX. The function48 expects a parameter with the type of _X, and sets the value of49 _X. After setting the value the function returns the class itself. The50 class also have to have a function, called for example run(), we have45 We have to define a class, let's call it \c named_fn. Let us assume that 46 we would like to use a parameter, called \c X. In the \c named_fn class we 47 have to define an \c _X attribute, and a function \c X. The function 48 expects a parameter with the type of \c _X, and sets the value of 49 \c _X. After setting the value the function returns the class itself. The 50 class also have to have a function, called for example <tt>run()</tt>, we have 51 51 to implement here the original function itself. The constructor of the 52 class have to give all the attributes like _X the default values of52 class have to give all the attributes like \c _X the default values of 53 53 them. 54 54 55 55 If we instantiate this class, the default values will be set for the 56 56 attributes (originally the parameters), initially. If we call function 57 X, we get a class with the modified parameter value of58 X. Therefore we can modify any parameter-value, independent from the59 order. To run the algorithm we have to call the run()function at the57 \c X, we get a class with the modified parameter value of 58 \c X. Therefore we can modify any parameter-value, independent from the 59 order. To run the algorithm we have to call the <tt>run()</tt> function at the 60 60 end of the row. 61 61 62 Example: named_fn().id(3).val(2).run(); 62 Example: 63 \code 64 named_fn().id(3).val(2).run(); 65 \endcode 63 66 64 67 \section traits-classes Traits Classes … … 93 96 DistMap and the PredMap is modified. 94 97 95 \section named-templ-func-param Named "Function"Template Parameters98 \section named-templ-func-param Named Function Template Parameters 96 99 97 100 If the class has so called wizard functions, the new class with the -
lemon/bfs.h
r1536 r1624 266 266 /// 267 267 template <class T> 268 class DefPredMap : public Bfs< Graph, 269 DefPredMapTraits<T> > { }; 268 class DefPredMap : public Bfs< Graph, DefPredMapTraits<T> > { }; 270 269 271 270 // template <class T> -
lemon/concept/graph.h
r1622 r1624 315 315 /// This constructor sets the iterator to the first outgoing edge of 316 316 /// the node. 317 ///@param n the node318 ///@param g the graph319 317 OutEdgeIt(const StaticGraph&, const Node&) { } 320 318 /// Edge -> OutEdgeIt conversion … … 364 362 /// This constructor set the iterator to the first incoming edge of 365 363 /// the node. 366 ///@param n the node367 ///@param g the graph368 364 InEdgeIt(const StaticGraph&, const Node&) { } 369 365 /// Edge -> InEdgeIt conversion -
lemon/concept/path.h
r1435 r1624 53 53 class EdgeIt; 54 54 55 /// \param _ GThe graph in which the path is.56 /// 57 Path(const Graph & ) {}55 /// \param _g The graph in which the path is. 56 /// 57 Path(const Graph &_g) {} 58 58 59 59 /// Length of the path. … … 182 182 Path &P; 183 183 184 ///\param _ Pthe path you want to fill in.184 ///\param _p the path you want to fill in. 185 185 /// 186 186 -
lemon/concept/undir_graph.h
r1620 r1624 315 315 316 316 /// This constructor sets the iterator to the first edge of \c g. 317 ///@param g the graph318 317 UndirEdgeIt(const UndirGraph&) { } 319 318 /// UndirEdge -> UndirEdgeIt conversion … … 363 362 /// This constructor set the iterator to the first incident edge of 364 363 /// the node. 365 ///@param n the node366 ///@param g the graph367 364 IncEdgeIt(const UndirGraph&, const Node&) { } 368 365 /// UndirEdge -> IncEdgeIt conversion
Note: See TracChangeset
for help on using the changeset viewer.