Minor doc improvements in maps.h.
authorPeter Kovacs <kpeter@inf.elte.hu>
Tue, 08 Jan 2008 02:12:50 +0100 (2008-01-08)
changeset 473750b8ebc91e
parent 46 b6dd98b57d71
child 48 93ae269876de
Minor doc improvements in maps.h.
lemon/maps.h
     1.1 --- a/lemon/maps.h	Mon Jan 07 23:57:48 2008 +0100
     1.2 +++ b/lemon/maps.h	Tue Jan 08 02:12:50 2008 +0100
     1.3 @@ -81,8 +81,9 @@
     1.4  
     1.5    /// Constant map.
     1.6  
     1.7 -  /// This is a readable map which assigns a specified value to each key.
     1.8 -  /// In other aspects it is equivalent to the \c NullMap.
     1.9 +  /// This is a \ref concepts::ReadMap "readable" map which assigns a 
    1.10 +  /// specified value to each key.
    1.11 +  /// In other aspects it is equivalent to \c NullMap.
    1.12    template<typename K, typename T>
    1.13    class ConstMap : public MapBase<K, T> {
    1.14    private:
    1.15 @@ -133,8 +134,9 @@
    1.16  
    1.17    /// Constant map with inlined constant value.
    1.18  
    1.19 -  /// This is a readable map which assigns a specified value to each key.
    1.20 -  /// In other aspects it is equivalent to the \c NullMap.
    1.21 +  /// This is a \ref concepts::ReadMap "readable" map which assigns a 
    1.22 +  /// specified value to each key.
    1.23 +  /// In other aspects it is equivalent to \c NullMap.
    1.24    template<typename K, typename V, V v>
    1.25    class ConstMap<K, Const<V, v> > : public MapBase<K, V> {
    1.26    public:
    1.27 @@ -149,7 +151,7 @@
    1.28      void set(const K&, const V&) { }
    1.29    };
    1.30  
    1.31 -  ///Returns a \c ConstMap class
    1.32 +  ///Returns a \c ConstMap class with inlined value
    1.33  
    1.34    ///This function just returns a \c ConstMap class with inlined value.
    1.35    ///\relates ConstMap
    1.36 @@ -162,6 +164,7 @@
    1.37  
    1.38    ///This is essentially a wrapper for \c std::map with addition that
    1.39    ///you can specify a default value different from \c Value().
    1.40 +  ///It meets the \ref concepts::ReferenceMap "ReferenceMap" concept.
    1.41    template <typename K, typename T, typename Compare = std::less<K> >
    1.42    class StdMap : public MapBase<K, T> {
    1.43      template <typename K1, typename T1, typename C1>
    1.44 @@ -190,13 +193,13 @@
    1.45  
    1.46      /// Constructor with specified default value
    1.47      StdMap(const T& value = T()) : _value(value) {}
    1.48 -    /// \brief Constructs the map from an appropriate std::map, and explicitly
    1.49 -    /// specifies a default value.
    1.50 +    /// \brief Constructs the map from an appropriate \c std::map, and 
    1.51 +    /// explicitly specifies a default value.
    1.52      template <typename T1, typename Comp1>
    1.53      StdMap(const std::map<Key, T1, Comp1> &map, const T& value = T()) 
    1.54        : _map(map.begin(), map.end()), _value(value) {}
    1.55      
    1.56 -    /// \brief Constructs a map from an other StdMap.
    1.57 +    /// \brief Constructs a map from an other \ref StdMap.
    1.58      template<typename T1, typename Comp1>
    1.59      StdMap(const StdMap<Key, T1, Comp1> &c) 
    1.60        : _map(c._map.begin(), c._map.end()), _value(c._value) {}
    1.61 @@ -265,10 +268,11 @@
    1.62  
    1.63    /// \brief Map for storing values for keys from the range <tt>[0..size-1]</tt>
    1.64    ///
    1.65 -  /// The current map has the <tt>[0..size-1]</tt> keyset and the values
    1.66 +  /// This map has the <tt>[0..size-1]</tt> keyset and the values
    1.67    /// are stored in a \c std::vector<T>  container. It can be used with
    1.68    /// some data structures, for example \c UnionFind, \c BinHeap, when 
    1.69 -  /// the used items are small integer numbers. 
    1.70 +  /// the used items are small integer numbers.
    1.71 +  /// This map meets the \ref concepts::ReferenceMap "ReferenceMap" concept.
    1.72    ///
    1.73    /// \todo Revise its name
    1.74    template <typename T>
    1.75 @@ -301,12 +305,12 @@
    1.76      /// Constructor with specified default value
    1.77      IntegerMap(int size = 0, const T& value = T()) : _vector(size, value) {}
    1.78  
    1.79 -    /// \brief Constructs the map from an appropriate std::vector.
    1.80 +    /// \brief Constructs the map from an appropriate \c std::vector.
    1.81      template <typename T1>
    1.82      IntegerMap(const std::vector<T1>& vector) 
    1.83        : _vector(vector.begin(), vector.end()) {}
    1.84      
    1.85 -    /// \brief Constructs a map from an other IntegerMap.
    1.86 +    /// \brief Constructs a map from an other \ref IntegerMap.
    1.87      template <typename T1>
    1.88      IntegerMap(const IntegerMap<T1> &c) 
    1.89        : _vector(c._vector.begin(), c._vector.end()) {}
    1.90 @@ -400,9 +404,7 @@
    1.91      ///\param _m is the underlying map.
    1.92      ConvertMap(const M &_m) : m(_m) {};
    1.93  
    1.94 -    /// \brief The subscript operator.
    1.95 -    ///
    1.96 -    /// The subscript operator.
    1.97 +    ///\e
    1.98      Value operator[](const Key& k) const {return m[k];}
    1.99    };
   1.100    
   1.101 @@ -490,7 +492,7 @@
   1.102    ///This \ref concepts::ReadMap "read only map" returns the sum of the two
   1.103    ///given maps.
   1.104    ///Its \c Key and \c Value are inherited from \c M1.
   1.105 -  ///The \c Key and \c Value of M2 must be convertible to those of \c M1.
   1.106 +  ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1.
   1.107    template<typename M1, typename M2> 
   1.108    class AddMap : public MapBase<typename M1::Key, typename M1::Value> {
   1.109      const M1& m1;
   1.110 @@ -510,7 +512,7 @@
   1.111    ///Returns an \c AddMap class
   1.112  
   1.113    ///This function just returns an \c AddMap class.
   1.114 -  ///\todo How to call these type of functions?
   1.115 +  ///\todo Extend the documentation: how to call these type of functions?
   1.116    ///
   1.117    ///\relates AddMap
   1.118    template<typename M1, typename M2> 
   1.119 @@ -1007,7 +1009,8 @@
   1.120    ///Template parameters \c K and \c V will become its
   1.121    ///\c Key and \c Value. 
   1.122    ///In most cases they have to be given explicitly because a 
   1.123 -  ///functor typically does not provide such typedefs.
   1.124 +  ///functor typically does not provide \c argument_type and 
   1.125 +  ///\c result_type typedefs.
   1.126    ///
   1.127    ///Parameter \c F is the type of the used functor.
   1.128    ///
   1.129 @@ -1032,8 +1035,9 @@
   1.130  
   1.131    ///This function just returns a \c FunctorMap class.
   1.132    ///
   1.133 -  ///It is specialized for adaptable function classes and
   1.134 -  ///C++ functions.
   1.135 +  ///This function is specialized for adaptable binary function
   1.136 +  ///classes and C++ functions.
   1.137 +  ///
   1.138    ///\relates FunctorMap
   1.139    template<typename K, typename V, typename F> inline 
   1.140    FunctorMap<F, K, V> functorMap(const F &f) {
   1.141 @@ -1056,7 +1060,7 @@
   1.142    ///Converts a map to an STL style (unary) functor
   1.143  
   1.144    ///This class Converts a map to an STL style (unary) functor.
   1.145 -  ///that is it provides an <tt>operator()</tt> to read its values.
   1.146 +  ///That is it provides an <tt>operator()</tt> to read its values.
   1.147    ///
   1.148    ///For the sake of convenience it also works as
   1.149    ///a ususal \ref concepts::ReadMap "readable map",
   1.150 @@ -1091,14 +1095,14 @@
   1.151      return MapFunctor<M>(m);
   1.152    }
   1.153  
   1.154 -  ///Applies all map setting operations to two maps
   1.155 +  ///Just readable version of \ref ForkWriteMap
   1.156  
   1.157    ///This map has two \ref concepts::ReadMap "readable map"
   1.158    ///parameters and each read request will be passed just to the
   1.159 -  ///first map. This class is the just readable map type of the \c ForkWriteMap.
   1.160 +  ///first map. This class is the just readable map type of \c ForkWriteMap.
   1.161    ///
   1.162    ///The \c Key and \c Value are inherited from \c M1.
   1.163 -  ///The \c Key and \c Value of M2 must be convertible from those of \c M1.
   1.164 +  ///The \c Key and \c Value of \c M2 must be convertible from those of \c M1.
   1.165    ///
   1.166    ///\sa ForkWriteMap
   1.167    ///
   1.168 @@ -1128,7 +1132,7 @@
   1.169    ///corresponding values of \c M1.
   1.170    ///
   1.171    ///The \c Key and \c Value are inherited from \c M1.
   1.172 -  ///The \c Key and \c Value of M2 must be convertible from those of \c M1.
   1.173 +  ///The \c Key and \c Value of \c M2 must be convertible from those of \c M1.
   1.174    ///
   1.175    ///\sa ForkMap
   1.176    template<typename  M1, typename M2> 
   1.177 @@ -1174,7 +1178,7 @@
   1.178    
   1.179    ///This bool \ref concepts::ReadMap "read only map" returns the 
   1.180    ///logical negation of the value returned by the given map.
   1.181 -  ///Its \c Key is inherited from \c M, its Value is \c bool.
   1.182 +  ///Its \c Key is inherited from \c M, its \c Value is \c bool.
   1.183    ///
   1.184    ///\sa NotWriteMap
   1.185    template <typename M> 
   1.186 @@ -1196,7 +1200,7 @@
   1.187    ///This bool \ref concepts::ReadWriteMap "read-write map" returns the 
   1.188    ///logical negation of the value returned by the given map. When it is set,
   1.189    ///the opposite value is set to the original map.
   1.190 -  ///Its \c Key is inherited from \c M, its Value is \c bool.
   1.191 +  ///Its \c Key is inherited from \c M, its \c Value is \c bool.
   1.192    ///
   1.193    ///\sa NotMap
   1.194    template <typename M> 
   1.195 @@ -1262,15 +1266,14 @@
   1.196    /// \brief Writable bool map for logging each \c true assigned element
   1.197    ///
   1.198    /// A \ref concepts::ReadWriteMap "read-write" bool map for logging 
   1.199 -  /// each \c true assigned element, i.e it/ copies all the keys set 
   1.200 +  /// each \c true assigned element, i.e it copies all the keys set 
   1.201    /// to \c true to the given iterator.
   1.202    ///
   1.203    /// \note The container of the iterator should contain space 
   1.204    /// for each element.
   1.205    ///
   1.206 -  /// The following example shows how you can write the edges found by the Prim
   1.207 -  /// algorithm directly
   1.208 -  /// to the standard output.
   1.209 +  /// The following example shows how you can write the edges found by 
   1.210 +  /// the \ref Prim algorithm directly to the standard output.
   1.211    ///\code
   1.212    /// typedef IdMap<Graph, Edge> EdgeIdMap;
   1.213    /// EdgeIdMap edgeId(graph);