# HG changeset patch # User alpar # Date 1080833551 0 # Node ID e9024dad7fc1b5b5638c778e39bf628519800182 # Parent 6179d85566e4959fa12518a57198e81e3dd82cf2 M_PI diff -r 6179d85566e4 -r e9024dad7fc1 doc/maps.dox --- a/doc/maps.dox Wed Mar 31 17:57:15 2004 +0000 +++ b/doc/maps.dox Thu Apr 01 15:32:31 2004 +0000 @@ -11,9 +11,10 @@ This simple map assigns \f$\pi\f$ to each edge. \code -class MyMap +struct MyMap { - double operator[](Graph::EdgeIt e) const { return 1;} + typedef double ValueType; + double operator[](Graph::EdgeIt e) const { return M_PI;} }; \endcode @@ -28,6 +29,9 @@ const Graph::EdgeMap &ol; const Graph::NodeMap &pot; +public: + typedef double ValueType; + double operator[](Graph::EdgeIt e) const { return ol.get(e)-pot.get(v)-pot.get(u); } @@ -37,4 +41,5 @@ }; \endcode +\todo Don't we need \e to \e require a 'typedef xxx KeyType' tag, as well? */