doc/maps2.dox
changeset 2584 84ef3c5b3698
parent 2553 bfced05fa852
equal deleted inserted replaced
3:2d128f916bbd 4:26aa70149636
    40 \code
    40 \code
    41 struct MyMap 
    41 struct MyMap 
    42 {
    42 {
    43   typedef double Value;
    43   typedef double Value;
    44   typedef Graph::Edge Key;
    44   typedef Graph::Edge Key;
    45   double operator[](const Key &e) const { return M_PI;}
    45   double operator[](const Key &e) const { return PI;}
    46 };
    46 };
    47 \endcode
    47 \endcode
    48 
    48 
    49 An alternative way to define maps is to use MapBase
    49 An alternative way to define maps is to use MapBase
    50 
    50 
    51 \code
    51 \code
    52 struct MyMap : public MapBase<Graph::Edge,double>
    52 struct MyMap : public MapBase<Graph::Edge,double>
    53 {
    53 {
    54   Value operator[](const Key& e) const { return M_PI;}
    54   Value operator[](const Key& e) const { return PI;}
    55 };
    55 };
    56 \endcode
    56 \endcode
    57 
    57 
    58 Here is a bit more complex example.
    58 Here is a bit more complex example.
    59 It provides a length function obtained
    59 It provides a length function obtained