1.1 --- a/lemon/maps.h Mon Jul 04 16:18:11 2005 +0000
1.2 +++ b/lemon/maps.h Mon Jul 04 16:27:54 2005 +0000
1.3 @@ -227,15 +227,6 @@
1.4 ///converts the \c Value of a maps to type \c T.
1.5 ///Its \c Value is inherited from \c M.
1.6 ///
1.7 - ///Actually,
1.8 - ///\code
1.9 - /// ConvertMap<X> sh(x,v);
1.10 - ///\endcode
1.11 - ///it is equivalent with
1.12 - ///\code
1.13 - /// ConstMap<X::Key, X::Value> c_tmp(v);
1.14 - /// AddMap<X, ConstMap<X::Key, X::Value> > sh(x,v);
1.15 - ///\endcode
1.16 ///\bug wrong documentation
1.17 template<class M, class T>
1.18 class ConvertMap {
1.19 @@ -252,14 +243,13 @@
1.20 ///Constructor
1.21
1.22 ///Constructor
1.23 - ///\param _m is the undelying map
1.24 - ///\param _v is the convert value
1.25 + ///\param _m is the underlying map
1.26 ConvertMap(const M &_m) : m(_m) {};
1.27
1.28 /// \brief The subscript operator.
1.29 ///
1.30 /// The subscript operator.
1.31 - /// \param edge The edge
1.32 + /// \param k The key
1.33 /// \return The target of the edge
1.34 Value operator[](Key k) const {return m[k];}
1.35 };
1.36 @@ -297,9 +287,6 @@
1.37 typedef typename M1::Value Value;
1.38
1.39 ///Constructor
1.40 -
1.41 - ///\e
1.42 - ///
1.43 AddMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
1.44 Value operator[](Key k) const {return m1[k]+m2[k];}
1.45 };
1.46 @@ -386,9 +373,6 @@
1.47 typedef typename M1::Value Value;
1.48
1.49 ///Constructor
1.50 -
1.51 - ///\e
1.52 - ///
1.53 SubMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
1.54 Value operator[](Key k) const {return m1[k]-m2[k];}
1.55 };
1.56 @@ -426,9 +410,6 @@
1.57 typedef typename M1::Value Value;
1.58
1.59 ///Constructor
1.60 -
1.61 - ///\e
1.62 - ///
1.63 MulMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
1.64 Value operator[](Key k) const {return m1[k]*m2[k];}
1.65 };
1.66 @@ -512,9 +493,6 @@
1.67 typedef typename M1::Value Value;
1.68
1.69 ///Constructor
1.70 -
1.71 - ///\e
1.72 - ///
1.73 DivMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
1.74 Value operator[](Key k) const {return m1[k]/m2[k];}
1.75 };
1.76 @@ -560,9 +538,6 @@
1.77 typedef typename M1::Value Value;
1.78
1.79 ///Constructor
1.80 -
1.81 - ///\e
1.82 - ///
1.83 ComposeMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
1.84 Value operator[](Key k) const {return m1[m2[k]];}
1.85 };
1.86 @@ -615,9 +590,6 @@
1.87 typedef V Value;
1.88
1.89 ///Constructor
1.90 -
1.91 - ///\e
1.92 - ///
1.93 CombineMap(const M1 &_m1,const M2 &_m2,const F &_f)
1.94 : m1(_m1), m2(_m2), f(_f) {};
1.95 Value operator[](Key k) const {return f(m1[k],m2[k]);}
1.96 @@ -666,9 +638,6 @@
1.97 typedef typename M::Value Value;
1.98
1.99 ///Constructor
1.100 -
1.101 - ///\e
1.102 - ///
1.103 NegMap(const M &_m) : m(_m) {};
1.104 Value operator[](Key k) const {return -m[k];}
1.105 };
1.106 @@ -720,9 +689,6 @@
1.107 typedef typename M::Value Value;
1.108
1.109 ///Constructor
1.110 -
1.111 - ///\e
1.112 - ///
1.113 AbsMap(const M &_m) : m(_m) {};
1.114 Value operator[](Key k) const {Value tmp=m[k]; return tmp>=0?tmp:-tmp;}
1.115 };
1.116 @@ -763,9 +729,6 @@
1.117 typedef V Value;
1.118
1.119 ///Constructor
1.120 -
1.121 - ///\e
1.122 - ///
1.123 FunctorMap(const F &_f) : f(_f) {};
1.124 Value operator[](Key k) const {return f(k);}
1.125 };