equal
deleted
inserted
replaced
11 This simple map assigns \f$\pi\f$ to each edge. |
11 This simple map assigns \f$\pi\f$ to each edge. |
12 |
12 |
13 \code |
13 \code |
14 class MyMap |
14 class MyMap |
15 { |
15 { |
16 double get(Graph::EdgeIt e) { return M_PI;} |
16 double get(Graph::EdgeIt e) const { return M_PI;} |
17 }; |
17 }; |
18 \endcode |
18 \endcode |
19 |
19 |
20 Or if we accept the new map style, it will look like this: |
20 Or if we accept the new map style, it will look like this: |
21 |
21 |
22 \code |
22 \code |
23 class MyMap |
23 class MyMap |
24 { |
24 { |
25 double operator[](Graph::EdgeIt e) { return 1;} |
25 double operator[](Graph::EdgeIt e) const { return 1;} |
26 }; |
26 }; |
27 \endcode |
27 \endcode |
28 |
28 |
29 |
29 |
30 A more complex example |
30 A more complex example |