COIN-OR::LEMON - Graph Library

Changeset 26:61bf7f22a6d6 in lemon


Ignore:
Timestamp:
12/22/07 15:04:22 (11 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
27:6724953f2f44, 29:0cb4ba427bfd
Phase:
public
Message:

Several doc improvements in maps.h

Location:
lemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/concept_check.h

    r25 r26  
    1717 */
    1818
    19 // Modified for use in LEMON.
    20 // We should really consider using Boost...
     19// This file contains a modified version of the concept checking
     20// utility from BOOST.
     21// See the appropriate copyright notice below.
    2122
    22 //
    2323// (C) Copyright Jeremy Siek 2000.
    2424// Distributed under the Boost Software License, Version 1.0. (See
  • lemon/maps.h

    r25 r26  
    248248  /// are stored in a \c std::vector<T>  container. It can be used with
    249249  /// some data structures, for example \c UnionFind, \c BinHeap, when
    250   /// the used items are small integer numbers.
     250  /// the used items are small integer numbers.
     251  ///
     252  /// \todo Revise its name
    251253  template <typename T>
    252254  class IntegerMap {
     
    347349 
    348350
    349   ///Convert the \c Value of a map to another type.
    350 
     351  ///\brief Convert the \c Value of a map to another type using
     352  ///the default conversion.
     353  ///
    351354  ///This \c concepts::ReadMap "read only map"
    352355  ///converts the \c Value of a maps to type \c T.
     
    369372    ///
    370373    /// The subscript operator.
    371     /// \param k The key
    372     /// \return The target of the arc
    373374    Value operator[](const Key& k) const {return m[k];}
    374375  };
     
    389390  ///combined with simple read maps. This map adaptor wraps the given
    390391  ///map to simple read map.
     392  ///
     393  /// \todo Revise the misleading name
    391394  template<typename M>
    392395  class SimpleMap : public MapBase<typename M::Key, typename M::Value> {
     
    406409  ///Simple writeable wrapping of the map
    407410
    408   ///This \c concepts::ReadMap "read only map" returns the simple
     411  ///This \c concepts::WriteMap "write map" returns the simple
    409412  ///wrapping of the given map. Sometimes the reference maps cannot be
    410413  ///combined with simple read-write maps. This map adaptor wraps the
    411414  ///given map to simple read-write map.
     415  ///
     416  /// \todo Revise the misleading name
    412417  template<typename M>
    413418  class SimpleWriteMap : public MapBase<typename M::Key, typename M::Value> {
     
    494499  };
    495500
    496   ///Shift a map with a constant.
     501  ///Shift a map with a constant. This map is also writable.
    497502
    498503  ///This \c concepts::ReadWriteMap "read-write map" returns the sum of the
     
    550555  ///given maps. Its \c Key and \c Value will be inherited from \c M1.
    551556  ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1.
    552 
     557  ///
     558  /// \todo Revise the misleading name
    553559  template<typename M1, typename M2>
    554560  class SubMap : public MapBase<typename M1::Key, typename M1::Value> {
     
    642648  };
    643649
    644   ///Scales a maps with a constant.
     650  ///Scales a maps with a constant (ReadWrite version).
    645651
    646652  ///This \c concepts::ReadWriteMap "read-write map" returns the value of the
     
    859865  };
    860866 
    861   ///Negative value of a map
     867  ///Negative value of a map (ReadWrite version)
    862868
    863869  ///This \c concepts::ReadWriteMap "read-write map" returns the negative
     
    906912  ///operator must be defined for it, of course.
    907913  ///
    908   ///\bug We need a unified way to handle the situation below:
    909   ///\code
    910   ///  struct _UnConvertible {};
    911   ///  template<class A> inline A t_abs(A a) {return _UnConvertible();}
    912   ///  template<> inline int t_abs<>(int n) {return abs(n);}
    913   ///  template<> inline long int t_abs<>(long int n) {return labs(n);}
    914   ///  template<> inline long long int t_abs<>(long long int n) {return ::llabs(n);}
    915   ///  template<> inline float t_abs<>(float n) {return fabsf(n);}
    916   ///  template<> inline double t_abs<>(double n) {return fabs(n);}
    917   ///  template<> inline long double t_abs<>(long double n) {return fabsl(n);}
    918   ///\endcode
    919  
    920914
    921915  template<typename M>
     
    10421036  ///The \c Key and \c Value will be inherited from \c M1.
    10431037  ///The \c Key and \c Value of M2 must be convertible from those of \c M1.
     1038  ///
     1039  /// \todo Why is it needed?
    10441040  template<typename  M1, typename M2>
    10451041  class ForkMap : public MapBase<typename M1::Key, typename M1::Value> {
     
    11251121  };
    11261122
    1127   ///Logical 'not' of a map with writing possibility
     1123  ///Logical 'not' of a map (ReadWrie version)
    11281124 
    11291125  ///This bool \c concepts::ReadWriteMap "read-write map" returns the
     
    11881184 
    11891185
    1190   /// \brief Writable bool map for store each true assigned elements.
    1191   ///
    1192   /// Writable bool map to store each true assigned elements. It will
     1186  /// \brief Writable bool map for logging each true assigned elements
     1187  ///
     1188  /// Writable bool map for logging each true assigned elements, i.e it
    11931189  /// copies all the keys set to true to the given iterator.
    11941190  ///
     
    11961192  /// for each element.
    11971193  ///
    1198   /// The next example shows how can you write the nodes directly
     1194  /// The following example shows how you can write the edges found by the Prim
     1195  /// algorithm directly
    11991196  /// to the standard output.
    12001197  ///\code
     
    12101207  /// prim(graph, cost, writerMap);
    12111208  ///\endcode
     1209  ///
     1210  ///\todo Revise the name of this class and the relates ones.
    12121211  template <typename _Iterator,
    12131212            typename _Functor =
     
    12271226      : _begin(it), _end(it), _functor(functor) {}
    12281227
    1229     /// Gives back the given iterator set for the first time.
     1228    /// Gives back the given iterator set for the first key
    12301229    Iterator begin() const {
    12311230      return _begin;
    12321231    }
    12331232 
    1234     /// Gives back the iterator after the last set operation.
     1233    /// Gives back the the 'after the last' iterator
    12351234    Iterator end() const {
    12361235      return _end;
     
    12501249  };
    12511250
    1252   /// \brief Writable bool map for store each true assigned elements in
    1253   /// a back insertable container.
    1254   ///
    1255   /// Writable bool map for store each true assigned elements in a back
    1256   /// insertable container. It will push back all the keys set to true into
    1257   /// the container. It can be used to retrieve the items into a standard
    1258   /// container. The next example shows how can you store the undirected
    1259   /// arcs in a vector with prim algorithm.
     1251  /// \brief Writable bool map for logging each true assigned elements in
     1252  /// a back insertable container
     1253  ///
     1254  /// Writable bool map for logging each true assigned elements by pushing
     1255  /// back them into a back insertable container.
     1256  /// It can be used to retrieve the items into a standard
     1257  /// container. The next example shows how you can store the
     1258  /// edges found by the Prim algorithm in a vector.
    12601259  ///
    12611260  ///\code
     
    12891288  };
    12901289
    1291   /// \brief Writable bool map for store each true assigned elements in
     1290  /// \brief Writable bool map for storing each true assignments in
    12921291  /// a front insertable container.
    12931292  ///
    1294   /// Writable bool map for store each true assigned elements in a front
     1293  /// Writable bool map for storing each true assignment in a front
    12951294  /// insertable container. It will push front all the keys set to \c true into
    12961295  /// the container. For example see the BackInserterBoolMap.
     
    13201319  };
    13211320
    1322   /// \brief Writable bool map for store each true assigned elements in
     1321  /// \brief Writable bool map for storing each true assigned elements in
    13231322  /// an insertable container.
    13241323  ///
    1325   /// Writable bool map for store each true assigned elements in an
     1324  /// Writable bool map for storing each true assigned elements in an
    13261325  /// insertable container. It will insert all the keys set to \c true into
    1327   /// the container. If you want to store the cut arcs of the strongly
     1326  /// the container.
     1327  ///
     1328  /// For example, if you want to store the cut arcs of the strongly
    13281329  /// connected components in a set you can use the next code:
    13291330  ///
     
    13701371  /// the container.
    13711372  ///
    1372   /// The next code finds the connected components of the undirected digraph
     1373  /// The following code finds the connected components of a graph
    13731374  /// and stores it in the \c comp map:
    13741375  ///\code
     
    14181419    }
    14191420
    1420     /// Setter function of the map
     1421    /// Set function of the map
    14211422    void set(const Key& key, Value value) {
    14221423      if (value) {
     
    14311432
    14321433
    1433   /// \brief Writable bool map which stores for each true assigned elements
    1434   /// the setting order number.
    1435   ///
     1434  /// \brief Writable bool map which stores the sequence number of
     1435  /// true assignments. 
     1436  /// 
    14361437  /// Writable bool map which stores for each true assigned elements 
    1437   /// the setting order number. It make easy to calculate the leaving
     1438  /// the sequence number of this setting.
     1439  /// It makes it easy to calculate the leaving
    14381440  /// order of the nodes in the \c Dfs algorithm.
    14391441  ///
     
    14541456  ///\endcode
    14551457  ///
    1456   /// The discovering order can be stored a little harder because the
     1458  /// The storing of the discovering order is more difficult because the
    14571459  /// ReachedMap should be readable in the dfs algorithm but the setting
    1458   /// order map is not readable. Now we should use the fork map:
     1460  /// order map is not readable. Thus we must use the fork map:
    14591461  ///
    14601462  ///\code
Note: See TracChangeset for help on using the changeset viewer.