COIN-OR::LEMON - Graph Library

Changeset 1536:308150155bb5 in lemon-0.x


Ignore:
Timestamp:
07/04/05 18:27:54 (14 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2028
Message:

Kill several doxygen warnings

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • doc/groups.dox

    r1402 r1536  
    6767Map adaptors are used to create "implicit" maps from other maps.
    6868
    69 Most of them are \ref concept::ReadMap "ReadMap"s. They can
     69Most of them are \ref lemon::concept::ReadMap "ReadMap"s. They can
    7070make arithmetic oprerations between one or two maps (negation, scalig,
    7171addition, multiplication etc.) or e.g. convert a map to another one
  • doc/license.dox

    r996 r1536  
    33\page license License Terms
    44
    5 \verbinclude ../../LICENSE
     5\verbinclude ../LICENSE
    66
    77*/
  • doc/named-param.dox

    r1438 r1536  
    55\section named-func-param Named "Function" Parameters
    66
    7 C++ makes it possible to use default parameter values when calling a function. In such
    8 a case we do not have to give value for parameters, the program will use the default ones.
    9 Unfortunately sometimes this is not enough. If we do not want to give values for all the parameters, only
    10 for some of them we come across problems, because an arbitrary set of parameters cannot be omitted. On the other hand parameters have a fixed order in the head of the function.
    11 C++ can apply the default values only in the back of the order, if we do not give other value for them.
    12 So we can not give the function for example the value of the first, and the third parameter, expecting that the program will aplly the default value for the second parameter.
    13 However sometimes we would like to use some functinos exactly in this way. With a crafty trick and with some little inconvenience this is possible. We have implemented this little trick as an example below.
     7C++ makes it possible to use default parameter values when calling a
     8function. In such a case we do not have to give value for parameters,
     9the program will use the default ones.  Unfortunately sometimes this
     10is not enough. If we do not want to give values for all the
     11parameters, only for some of them we come across problems, because an
     12arbitrary set of parameters cannot be omitted. On the other hand
     13parameters have a fixed order in the head of the function.  C++ can
     14apply the default values only in the back of the order, if we do not
     15give other value for them.  So we can not give the function for
     16example the value of the first, and the third parameter, expecting
     17that the program will aplly the default value for the second
     18parameter.  However sometimes we would like to use some functinos
     19exactly in this way. With a crafty trick and with some little
     20inconvenience this is possible. We have implemented this little trick
     21as an example below.
    1422
    1523\code
     
    3543The usage is the following.
    3644
    37 We have to define a class, let's call it named_fn.
    38 Let us assume that we would like to use a parameter, called X. In the named_fn class we have to define an _X attribute, and an X function. The function expects a parameter with the type of _X, and sets the value of _X. After setting the value the function returns the class itself. The class also have to have a function, called for example run(), we have to implement here the original function itself. The constructor of the class have to give all the attributes like _X the default values of them.
     45We have to define a class, let's call it named_fn.  Let us assume that
     46we would like to use a parameter, called X. In the named_fn class we
     47have to define an _X attribute, and an X function. The function
     48expects a parameter with the type of _X, and sets the value of
     49_X. After setting the value the function returns the class itself. The
     50class also have to have a function, called for example run(), we have
     51to implement here the original function itself. The constructor of the
     52class have to give all the attributes like _X the default values of
     53them.
    3954
    40 If we instantiate this class, the default values will be set for the attributes (originally the parameters), initially. If we call the X function, we get a class with the modified parameter value of X. Therefore we can modify any parameter-value, independent from the order. To run the algorithm we have to call the run() function at the end of the row.
     55If we instantiate this class, the default values will be set for the
     56attributes (originally the parameters), initially. If we call the X
     57function, we get a class with the modified parameter value of
     58X. Therefore we can modify any parameter-value, independent from the
     59order. To run the algorithm we have to call the run() function at the
     60end of the row.
    4161
    4262Example: named_fn().id(3).val(2).run();
     
    4464\section traits-classes Traits Classes
    4565
    46 The procedure above can also be applied when defining classes. In this case the type of the attributes can be changed.
    47 Initially we have to define a class with the default attribute types. This is the so called Traits Class. Later on
    48 the types of these attributes can be changed, as described below. In our software \ref DijkstraDefaultTraits is an example of how a traits class looks like.
     66The procedure above can also be applied when defining classes. In this
     67case the type of the attributes can be changed.  Initially we have to
     68define a class with the default attribute types. This is the so called
     69Traits Class. Later on the types of these attributes can be changed,
     70as described below. In our software \ref lemon::DijkstraDefaultTraits is an
     71example of how a traits class looks like.
    4972
    5073\section named-templ-param Named Class Template Parameters
    5174
    52 If we would like to change the type of an attribute in a class that was instantiated by using a traits class as a template parameter, and the class contains named parameters, we do not have to reinstantiate the class with new traits class. Instead of that, adaptor classes can be used like in the following cases.
     75If we would like to change the type of an attribute in a class that
     76was instantiated by using a traits class as a template parameter, and
     77the class contains named parameters, we do not have to reinstantiate
     78the class with new traits class. Instead of that, adaptor classes can
     79be used like in the following cases.
    5380
    5481\code
     
    6390\endcode
    6491
    65 The result will be an instantiated Dijkstra class, in which the DistMap and the PredMap is modified.
     92The result will be an instantiated Dijkstra class, in which the
     93DistMap and the PredMap is modified.
    6694
    6795\section named-templ-func-param Named "Function" Template Parameters
    6896
    69 If the class has so called wizard functions, the new class with the modified tpye of attributes can be returned
    70 by the appropriate wizard function. The usage of these wizard functions is the following:
     97If the class has so called wizard functions, the new class with the
     98modified tpye of attributes can be returned by the appropriate wizard
     99function. The usage of these wizard functions is the following:
    71100
    72101*/
  • lemon/bfs.h

    r1516 r1536  
    8585 
    8686    ///This function instantiates a \ref ProcessedMap.
    87     ///\param G is the graph, to which
     87    ///\param g is the graph, to which
    8888    ///we would like to define the \ref ProcessedMap
     89#ifdef DOXYGEN
     90    static ProcessedMap *createProcessedMap(const GR &g)
     91#else
    8992    static ProcessedMap *createProcessedMap(const GR &)
     93#endif
    9094    {
    9195      return new ProcessedMap();
     
    660664   
    661665    ///This function copies the shortest path to \c t into \c p.
    662     ///If it \c \t is a source itself or unreachable, then it does not
     666    ///If \c t is a source itself or unreachable, then it does not
    663667    ///alter \c p.
    664668    ///\todo Is it the right way to handle unreachable nodes?
     
    771775 
    772776    ///This function instantiates a \ref PredMap.
    773     ///\param G is the graph, to which we would like to define the PredMap.
     777    ///\param g is the graph, to which we would like to define the PredMap.
    774778    ///\todo The graph alone may be insufficient to initialize
     779#ifdef DOXYGEN
     780    static PredMap *createPredMap(const GR &g)
     781#else
    775782    static PredMap *createPredMap(const GR &)
     783#endif
    776784    {
    777785      return new PredMap();
     
    804812 
    805813    ///This function instantiates a \ref ProcessedMap.
    806     ///\param G is the graph, to which
     814    ///\param g is the graph, to which
    807815    ///we would like to define the \ref ProcessedMap
     816#ifdef DOXYGEN
     817    static ProcessedMap *createProcessedMap(const GR &g)
     818#else
    808819    static ProcessedMap *createProcessedMap(const GR &)
     820#endif
    809821    {
    810822      return new ProcessedMap();
     
    834846 
    835847    ///This function instantiates a \ref DistMap.
    836     ///\param G is the graph, to which we would like to define the \ref DistMap
     848    ///\param g is the graph, to which we would like to define the \ref DistMap
     849#ifdef DOXYGEN
     850    static DistMap *createDistMap(const GR &g)
     851#else
    837852    static DistMap *createDistMap(const GR &)
     853#endif
    838854    {
    839855      return new DistMap();
  • lemon/dfs.h

    r1529 r1536  
    8585 
    8686    ///This function instantiates a \ref ProcessedMap.
    87     ///\param G is the graph, to which
     87    ///\param g is the graph, to which
    8888    ///we would like to define the \ref ProcessedMap
     89#ifdef DOXYGEN
     90    static ProcessedMap *createProcessedMap(const GR &g)
     91#else
    8992    static ProcessedMap *createProcessedMap(const GR &)
     93#endif
    9094    {
    9195      return new ProcessedMap();
     
    780784 
    781785    ///This function instantiates a \ref PredMap.
    782     ///\param G is the graph, to which we would like to define the PredMap.
     786    ///\param g is the graph, to which we would like to define the PredMap.
    783787    ///\todo The graph alone may be insufficient to initialize
     788#ifdef DOXYGEN
     789    static PredMap *createPredMap(const GR &g)
     790#else
    784791    static PredMap *createPredMap(const GR &)
     792#endif
    785793    {
    786794      return new PredMap();
     
    813821 
    814822    ///This function instantiates a \ref ProcessedMap.
    815     ///\param G is the graph, to which
     823    ///\param g is the graph, to which
    816824    ///we would like to define the \ref ProcessedMap
     825#ifdef DOXYGEN
     826    static ProcessedMap *createProcessedMap(const GR &g)
     827#else
    817828    static ProcessedMap *createProcessedMap(const GR &)
     829#endif
    818830    {
    819831      return new ProcessedMap();
     
    843855 
    844856    ///This function instantiates a \ref DistMap.
    845     ///\param G is the graph, to which we would like to define the \ref DistMap
     857    ///\param g is the graph, to which we would like to define the \ref DistMap
     858#ifdef DOXYGEN
     859    static DistMap *createDistMap(const GR &g)
     860#else
    846861    static DistMap *createDistMap(const GR &)
     862#endif
    847863    {
    848864      return new DistMap();
  • lemon/dijkstra.h

    r1516 r1536  
    109109 
    110110    ///This function instantiates a \ref ProcessedMap.
    111     ///\param G is the graph, to which
     111    ///\param g is the graph, to which
    112112    ///we would like to define the \ref ProcessedMap
     113#ifdef DOXYGEN
     114    static ProcessedMap *createProcessedMap(const GR &g)
     115#else
    113116    static ProcessedMap *createProcessedMap(const GR &)
     117#endif
    114118    {
    115119      return new ProcessedMap();
     
    664668   
    665669    ///This function copies the shortest path to \c t into \c p.
    666     ///If it \c \t is a source itself or unreachable, then it does not
     670    ///If it \c t is a source itself or unreachable, then it does not
    667671    ///alter \c p.
    668672    ///\todo Is it the right way to handle unreachable nodes?
     
    789793 
    790794    ///This function instantiates a \ref PredMap.
    791     ///\param G is the graph, to which we would like to define the PredMap.
     795    ///\param g is the graph, to which we would like to define the PredMap.
    792796    ///\todo The graph alone may be insufficient for the initialization
     797#ifdef DOXYGEN
     798    static PredMap *createPredMap(const GR &g)
     799#else
    793800    static PredMap *createPredMap(const GR &)
     801#endif
    794802    {
    795803      return new PredMap();
     
    807815 
    808816    ///This function instantiates a \ref ProcessedMap.
    809     ///\param G is the graph, to which
     817    ///\param g is the graph, to which
    810818    ///we would like to define the \ref ProcessedMap
     819#ifdef DOXYGEN
     820    static ProcessedMap *createProcessedMap(const GR &g)
     821#else
    811822    static ProcessedMap *createProcessedMap(const GR &)
     823#endif
    812824    {
    813825      return new ProcessedMap();
     
    822834 
    823835    ///This function instantiates a \ref DistMap.
    824     ///\param G is the graph, to which we would like to define the \ref DistMap
     836    ///\param g is the graph, to which we would like to define the \ref DistMap
     837#ifdef DOXYGEN
     838    static DistMap *createDistMap(const GR &g)
     839#else
    825840    static DistMap *createDistMap(const GR &)
     841#endif
    826842    {
    827843      return new DistMap();
  • lemon/error.h

    r1435 r1536  
    101101  protected:
    102102    ///\e
    103     ///\todo The good solution is boost:shared_ptr...
     103
     104    ///\todo The good solution is boost::shared_ptr...
     105    ///
    104106    mutable
    105107    std::auto_ptr<std::ostringstream> buf;
  • lemon/graph_adaptor.h

    r1472 r1536  
    452452  of edge-disjoint paths between \c s and \c t in the graph which has edge-set
    453453  all the tight edges. The computation will be demonstrated on the following
    454   graph, which is read from the dimacs file \ref sub_graph_adaptor_demo.dim.
     454  graph, which is read from the dimacs file \c sub_graph_adaptor_demo.dim.
    455455  The full source code is available in \ref sub_graph_adaptor_demo.cc.
    456456  If you are interested in more demo programs, you can use
  • lemon/graph_utils.h

    r1531 r1536  
    178178  /// }
    179179  /// \endcode
    180   /// \todo We may want to use the \ref concept::GraphBase "GraphBase"
     180  /// \todo We may want to use the "GraphBase"
    181181  /// interface here...
    182182  /// \bug Untested ...
     
    860860    ///
    861861    /// The subscript operator.
    862     /// \param edge The edge
     862    /// \param e The edge
    863863    /// \return The target of the edge
    864     Value operator[](const Key& key) {
    865       return graph.target(key);
     864    Value operator[](const Key& e) {
     865      return graph.target(e);
    866866    }
    867867
  • lemon/lp_base.h

    r1508 r1536  
    400400
    401401      ///\return
    402       ///- -\ref INF: the constraint is lower unbounded.
    403       ///- -\ref NaN: lower bound has not been set.
     402      ///- \ref INF "INF": the constraint is lower unbounded.
     403      ///- \ref NaN "NaN": lower bound has not been set.
    404404      ///- finite number: the lower bound
    405405      Value &lowerBound() { return _lb; }
     
    409409
    410410      ///\return
    411       ///- -\ref INF: the constraint is upper unbounded.
    412       ///- -\ref NaN: upper bound has not been set.
     411      ///- \ref INF "INF": the constraint is upper unbounded.
     412      ///- \ref NaN "NaN": upper bound has not been set.
    413413      ///- finite number: the upper bound
    414414      Value &upperBound() { return _ub; }
  • lemon/maps.h

    r1531 r1536  
    228228  ///Its \c Value is inherited from \c M.
    229229  ///
    230   ///Actually,
    231   ///\code
    232   ///  ConvertMap<X> sh(x,v);
    233   ///\endcode
    234   ///it is equivalent with
    235   ///\code
    236   ///  ConstMap<X::Key, X::Value> c_tmp(v);
    237   ///  AddMap<X, ConstMap<X::Key, X::Value> > sh(x,v);
    238   ///\endcode
    239230  ///\bug wrong documentation
    240231  template<class M, class T>
     
    253244
    254245    ///Constructor
    255     ///\param _m is the undelying map
    256     ///\param _v is the convert value
     246    ///\param _m is the underlying map
    257247    ConvertMap(const M &_m) : m(_m) {};
    258248
     
    260250    ///
    261251    /// The subscript operator.
    262     /// \param edge The edge
     252    /// \param k The key
    263253    /// \return The target of the edge
    264254    Value operator[](Key k) const {return m[k];}
     
    298288
    299289    ///Constructor
    300 
    301     ///\e
    302     ///
    303290    AddMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
    304291    Value operator[](Key k) const {return m1[k]+m2[k];}
     
    387374
    388375    ///Constructor
    389 
    390     ///\e
    391     ///
    392376    SubMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
    393377    Value operator[](Key k) const {return m1[k]-m2[k];}
     
    427411
    428412    ///Constructor
    429 
    430     ///\e
    431     ///
    432413    MulMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
    433414    Value operator[](Key k) const {return m1[k]*m2[k];}
     
    513494
    514495    ///Constructor
    515 
    516     ///\e
    517     ///
    518496    DivMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
    519497    Value operator[](Key k) const {return m1[k]/m2[k];}
     
    561539
    562540    ///Constructor
    563 
    564     ///\e
    565     ///
    566541    ComposeMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
    567542    Value operator[](Key k) const {return m1[m2[k]];}
     
    616591
    617592    ///Constructor
    618 
    619     ///\e
    620     ///
    621593    CombineMap(const M1 &_m1,const M2 &_m2,const F &_f)
    622594      : m1(_m1), m2(_m2), f(_f) {};
     
    667639
    668640    ///Constructor
    669 
    670     ///\e
    671     ///
    672641    NegMap(const M &_m) : m(_m) {};
    673642    Value operator[](Key k) const {return -m[k];}
     
    721690
    722691    ///Constructor
    723 
    724     ///\e
    725     ///
    726692    AbsMap(const M &_m) : m(_m) {};
    727693    Value operator[](Key k) const {Value tmp=m[k]; return tmp>=0?tmp:-tmp;}
     
    764730
    765731    ///Constructor
    766 
    767     ///\e
    768     ///
    769732    FunctorMap(const F &_f) : f(_f) {};
    770733    Value operator[](Key k) const {return f(k);}
Note: See TracChangeset for help on using the changeset viewer.