COIN-OR::LEMON - Graph Library

Changeset 987:87f7c54892df in lemon-0.x for doc/maps.dox


Ignore:
Timestamp:
11/13/04 18:07:10 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1377
Message:

Naming changes:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/maps.dox

    r986 r987  
    1010
    1111\code
    12   typedef Edge KeyType;
    13   typedef double ValueType;
     12  typedef Edge Key;
     13  typedef double Value;
    1414\endcode
    1515
     
    5353\endcode
    5454- <em>Writable maps</em> have
    55 a member function \c set(KeyType,const ValueType &)
     55a member function \c set(Key,const Value &)
    5656for this purpose.
    5757\code
     
    8383struct MyMap
    8484{
    85   typedef double ValueType;
    86   typedef Graph::Edge KeyType;
    87   double operator[](KeyType e) const { return M_PI;}
     85  typedef double Value;
     86  typedef Graph::Edge Key;
     87  double operator[](Key e) const { return M_PI;}
    8888};
    8989\endcode
     
    9696struct MyMap : public MapBase<Graph::Edge,double>
    9797{
    98   ValueType operator[](KeyType e) const { return M_PI;}
     98  Value operator[](Key e) const { return M_PI;}
    9999};
    100100\endcode
     
    112112 
    113113public:
    114   ValueType operator[](KeyType e) const {
     114  Value operator[](Key e) const {
    115115    return orig_len.get(e)-pot.get(G.target(e))-pot.get(G.source(e));
    116116  }
Note: See TracChangeset for help on using the changeset viewer.