Changeset 210:6bc65a8a99c6 in lemon-0.x
- Timestamp:
- 03/19/04 22:15:14 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@305
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/maps.dox
r205 r210 14 14 class MyMap 15 15 { 16 double get(Graph::EdgeIt e) const { return M_PI;}17 };18 \endcode19 20 Or if we accept the new map style, it will look like this:21 22 \code23 class MyMap24 {25 16 double operator[](Graph::EdgeIt e) const { return 1;} 26 17 }; … … 28 19 29 20 30 A more complex example 21 Here is a more complex example. It provides a length function which is obtained 22 from a base length function modified by a potential difference. 23 \todo Please improve on the english. 31 24 32 25 \code … … 36 29 const Graph::NodeMap &pot; 37 30 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 } 39 34 40 35 MyComplexMap(const Graph::EdgeMap &o,const Graph::NodeMap &p) :
Note: See TracChangeset
for help on using the changeset viewer.