COIN-OR::LEMON - Graph Library

Changeset 1713:49d22d34d95f in lemon-0.x for doc


Ignore:
Timestamp:
10/06/05 12:28:45 (18 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2240
Message:

Doc improvments

Location:
doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/getstart.dox

    r1640 r1713  
    149149\endverbatim
    150150The 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 not
    152 likely).
     151the GLPK headers and libraries are not under the same prefix (which is
     152unlikely).
    153153
    154154\verbatim
     
    156156\endverbatim
    157157The 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 not
    159 likely).
     158the GLPK headers and libraries are not under the same prefix (which is
     159unlikely).
    160160
    161161\verbatim
     
    237237therefore iterating throuh its edges and nodes is fast.
    238238
    239 After some convenient typedefs we create a graph and add three nodes to it.
     239After some convenience typedefs we create a graph and add three nodes to it.
    240240Then we add edges to it to form a complete graph.
    241241
     
    251251
    252252If your installation of LEMON into directory \c /usr/local was
    253 successful then it is very easy to compile this program with the
     253successful, then it is very easy to compile this program with the
    254254following command (the argument <tt>-lemon</tt> tells the compiler
    255255that we are using the installed library LEMON):
  • doc/named-param.dox

    r1709 r1713  
    2222
    2323\code
    24 class named_fn
     24class namedFn
    2525{
    2626  int _id;
     
    2929 
    3030  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; }
    3535
    3636  run() {
     
    4343The usage is the following.
    4444
    45 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
     45We have to define a class, let's call it \c namedFn.  Let us assume that
     46we would like to use a parameter, called \c X. In the \c namedFn class we
    4747have to define an \c _X attribute, and a function \c X. The function
    4848expects a parameter with the type of \c _X, and sets the value of
     
    5656attributes (originally the parameters), initially. If we call function
    5757\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
     58\c X. Therefore we can modify any parameter-value, independently from the
    5959order. To run the algorithm we have to call the <tt>run()</tt> function at the
    6060end of the row.
     
    6262Example:
    6363\code
    64 named_fn().id(3).val(2).run();
     64namedFn().id(3).val(2).run();
    6565\endcode
     66
     67\note Although it is a class, namedFn is used pretty much like as it were
     68a 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
     71actual function code were put in the destructor instead. This however would make
     72hard to implement functions with return values, and would also make the
     73implementation of \ref named-templ-func-param "named template parameters"
     74very problematic. Therefore, by convention, <tt>.run()</tt> is used
     75to explicitly execute function having named parameters in Lemon.
     76
    6677
    6778\section traits-classes Traits Classes
Note: See TracChangeset for help on using the changeset viewer.