COIN-OR::LEMON - Graph Library

Changeset 210:6bc65a8a99c6 in lemon-0.x for doc/maps.dox


Ignore:
Timestamp:
03/19/04 22:15:14 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@305
Message:

get() -> operator[]()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/maps.dox

    r205 r210  
    1414class MyMap
    1515{
    16   double get(Graph::EdgeIt e) const { return M_PI;}
    17 };
    18 \endcode
    19 
    20 Or if we accept the new map style, it will look like this:
    21 
    22 \code
    23 class MyMap
    24 {
    2516  double operator[](Graph::EdgeIt e) const { return 1;}
    2617};
     
    2819
    2920
    30 A more complex example
     21Here is a more complex example. It provides a length function which is obtained
     22from a base length function modified by a potential difference.
     23\todo Please improve on the english.
    3124
    3225\code
     
    3629  const Graph::NodeMap &pot;
    3730 
    38   double get(Graph::EdgeIt e) const { return ol.get(e)-pot.get(v)-pot.get(u);}
     31  double operator[](Graph::EdgeIt e) const {
     32    return ol.get(e)-pot.get(v)-pot.get(u);
     33  }
    3934 
    4035  MyComplexMap(const Graph::EdgeMap &o,const Graph::NodeMap &p) :
Note: See TracChangeset for help on using the changeset viewer.