COIN-OR::LEMON - Graph Library

Changeset 769:b52189c479fb in lemon


Ignore:
Timestamp:
08/02/09 17:22:43 (15 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Doc improvements for several graph maps (#302)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r768 r769  
    5757  /// but data written to it is not required (i.e. it will be sent to
    5858  /// <tt>/dev/null</tt>).
    59   /// It conforms the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     59  /// It conforms to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    6060  ///
    6161  /// \sa ConstMap
     
    9090  ///
    9191  /// In other aspects it is equivalent to \c NullMap.
    92   /// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap"
     92  /// So it conforms to the \ref concepts::ReadWriteMap "ReadWriteMap"
    9393  /// concept, but it absorbs the data written to it.
    9494  ///
     
    159159  ///
    160160  /// In other aspects it is equivalent to \c NullMap.
    161   /// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap"
     161  /// So it conforms to the \ref concepts::ReadWriteMap "ReadWriteMap"
    162162  /// concept, but it absorbs the data written to it.
    163163  ///
     
    233233  /// It can be used with some data structures, for example
    234234  /// \c UnionFind, \c BinHeap, when the used items are small
    235   /// integers. This map conforms the \ref concepts::ReferenceMap
     235  /// integers. This map conforms to the \ref concepts::ReferenceMap
    236236  /// "ReferenceMap" concept.
    237237  ///
     
    341341  /// stored actually. This value can be different from the default
    342342  /// contructed value (i.e. \c %Value()).
    343   /// This type conforms the \ref concepts::ReferenceMap "ReferenceMap"
     343  /// This type conforms to the \ref concepts::ReferenceMap "ReferenceMap"
    344344  /// concept.
    345345  ///
     
    707707  /// The \c Key type of it is inherited from \c M and the \c Value
    708708  /// type is \c V.
    709   /// This type conforms the \ref concepts::ReadMap "ReadMap" concept.
     709  /// This type conforms to the \ref concepts::ReadMap "ReadMap" concept.
    710710  ///
    711711  /// The simplest way of using this map is through the convertMap()
     
    18661866  public:
    18671867
    1868     /// \brief This class represents the inverse of its owner (IdMap).
    1869     ///
    1870     /// This class represents the inverse of its owner (IdMap).
     1868    /// \brief The inverse map type of IdMap.
     1869    ///
     1870    /// The inverse map type of IdMap. The subscript operator gives back
     1871    /// an item by its id.
     1872    /// This type conforms to the \ref concepts::ReadMap "ReadMap" concept.
    18711873    /// \see inverse()
    18721874    class InverseMap {
     
    18831885      explicit InverseMap(const IdMap& map) : _graph(map._graph) {}
    18841886
    1885       /// \brief Gives back the given item from its id.
     1887      /// \brief Gives back an item by its id.
    18861888      ///
    1887       /// Gives back the given item from its id.
     1889      /// Gives back an item by its id.
    18881890      Item operator[](int id) const { return _graph->fromId(id, Item());}
    18891891
     
    19041906  /// It wraps a standard graph map (\c NodeMap, \c ArcMap or \c EdgeMap)
    19051907  /// and if a key is set to a new value, then stores it in the inverse map.
    1906   /// The values of the map can be accessed
    1907   /// with stl compatible forward iterator.
     1908  /// The graph items can be accessed by their values either using
     1909  /// \c InverseMap or \c operator()(), and the values of the map can be
     1910  /// accessed with an STL compatible forward iterator (\c ValueIterator).
     1911  ///
     1912  /// This map is intended to be used when all associated values are
     1913  /// different (the map is actually invertable) or there are only a few
     1914  /// items with the same value.
     1915  /// Otherwise consider to use \c IterableValueMap, which is more
     1916  /// suitable and more efficient for such cases. It provides iterators
     1917  /// to traverse the items with the same associated value, however
     1918  /// it does not have \c InverseMap.
    19081919  ///
    19091920  /// This type is not reference map, so it cannot be modified with
     
    19461957    /// \brief Forward iterator for values.
    19471958    ///
    1948     /// This iterator is an stl compatible forward
     1959    /// This iterator is an STL compatible forward
    19491960    /// iterator on the values of the map. The values can
    19501961    /// be accessed in the <tt>[beginValue, endValue)</tt> range.
     
    19591970    public:
    19601971
     1972      /// Constructor
    19611973      ValueIterator() {}
    19621974
     1975      /// \e
    19631976      ValueIterator& operator++() { ++it; return *this; }
     1977      /// \e
    19641978      ValueIterator operator++(int) {
    19651979        ValueIterator tmp(*this);
     
    19681982      }
    19691983
     1984      /// \e
    19701985      const Value& operator*() const { return it->first; }
     1986      /// \e
    19711987      const Value* operator->() const { return &(it->first); }
    19721988
     1989      /// \e
    19731990      bool operator==(ValueIterator jt) const { return it == jt.it; }
     1991      /// \e
    19741992      bool operator!=(ValueIterator jt) const { return it != jt.it; }
    19751993
     
    19801998    /// \brief Returns an iterator to the first value.
    19811999    ///
    1982     /// Returns an stl compatible iterator to the
     2000    /// Returns an STL compatible iterator to the
    19832001    /// first value of the map. The values of the
    19842002    /// map can be accessed in the <tt>[beginValue, endValue)</tt>
     
    19902008    /// \brief Returns an iterator after the last value.
    19912009    ///
    1992     /// Returns an stl compatible iterator after the
     2010    /// Returns an STL compatible iterator after the
    19932011    /// last value of the map. The values of the
    19942012    /// map can be accessed in the <tt>[beginValue, endValue)</tt>
     
    20912109  public:
    20922110
    2093     /// \brief The inverse map type.
    2094     ///
    2095     /// The inverse of this map. The subscript operator of the map
    2096     /// gives back the item that was last assigned to the value.
     2111    /// \brief The inverse map type of CrossRefMap.
     2112    ///
     2113    /// The inverse map type of CrossRefMap. The subscript operator gives
     2114    /// back an item by its value.
     2115    /// This type conforms to the \ref concepts::ReadMap "ReadMap" concept.
     2116    /// \see inverse()
    20972117    class InverseMap {
    20982118    public:
     
    21212141    };
    21222142
    2123     /// \brief It gives back the read-only inverse map.
    2124     ///
    2125     /// It gives back the read-only inverse map.
     2143    /// \brief Gives back the inverse of the map.
     2144    ///
     2145    /// Gives back the inverse of the CrossRefMap.
    21262146    InverseMap inverse() const {
    21272147      return InverseMap(*this);
     
    22732293    }
    22742294
    2275     /// \brief Gives back the \e RangeId of the item
    2276     ///
    2277     /// Gives back the \e RangeId of the item.
     2295    /// \brief Gives back the \e range \e id of the item
     2296    ///
     2297    /// Gives back the \e range \e id of the item.
    22782298    int operator[](const Item& item) const {
    22792299      return Map::operator[](item);
    22802300    }
    22812301
    2282     /// \brief Gives back the item belonging to a \e RangeId
    2283     ///
    2284     /// Gives back the item belonging to a \e RangeId.
     2302    /// \brief Gives back the item belonging to a \e range \e id
     2303    ///
     2304    /// Gives back the item belonging to the given \e range \e id.
    22852305    Item operator()(int id) const {
    22862306      return _inv_map[id];
     
    22962316    /// \brief The inverse map type of RangeIdMap.
    22972317    ///
    2298     /// The inverse map type of RangeIdMap.
     2318    /// The inverse map type of RangeIdMap. The subscript operator gives
     2319    /// back an item by its \e range \e id.
     2320    /// This type conforms to the \ref concepts::ReadMap "ReadMap" concept.
    22992321    class InverseMap {
    23002322    public:
     
    23142336      ///
    23152337      /// Subscript operator. It gives back the item
    2316       /// that the descriptor currently belongs to.
     2338      /// that the given \e range \e id currently belongs to.
    23172339      Value operator[](const Key& key) const {
    23182340        return _inverted(key);
     
    23322354    /// \brief Gives back the inverse of the map.
    23332355    ///
    2334     /// Gives back the inverse of the map.
     2356    /// Gives back the inverse of the RangeIdMap.
    23352357    const InverseMap inverse() const {
    23362358      return InverseMap(*this);
     
    23432365  /// \c bool value for graph items (\c Node, \c Arc or \c Edge).
    23442366  /// For both \c true and \c false values it is possible to iterate on
    2345   /// the keys.
     2367  /// the keys mapped to the value.
    23462368  ///
    23472369  /// This type is a reference map, so it can be modified with the
    2348   /// subscription operator.
     2370  /// subscript operator.
    23492371  ///
    23502372  /// \tparam GR The graph type.
     
    27122734  /// mapped to the value.
    27132735  ///
     2736  /// This map is intended to be used with small integer values, for which
     2737  /// it is efficient, and supports iteration only for non-negative values.
     2738  /// If you need large values and/or iteration for negative integers,
     2739  /// consider to use \ref IterableValueMap instead.
     2740  ///
    27142741  /// This type is a reference map, so it can be modified with the
    2715   /// subscription operator.
     2742  /// subscript operator.
    27162743  ///
    27172744  /// \note The size of the data structure depends on the largest
     
    29933020  /// \brief Dynamic iterable map for comparable values.
    29943021  ///
    2995   /// This class provides a special graph map type which can store an
     3022  /// This class provides a special graph map type which can store a
    29963023  /// comparable value for graph items (\c Node, \c Arc or \c Edge).
    29973024  /// For each value it is possible to iterate on the keys mapped to
    2998   /// the value.
    2999   ///
    3000   /// The map stores for each value a linked list with
    3001   /// the items which mapped to the value, and the values are stored
    3002   /// in balanced binary tree. The values of the map can be accessed
    3003   /// with stl compatible forward iterator.
     3025  /// the value (\c ItemIt), and the values of the map can be accessed
     3026  /// with an STL compatible forward iterator (\c ValueIterator).
     3027  /// The map stores a linked list for each value, which contains
     3028  /// the items mapped to the value, and the used values are stored
     3029  /// in balanced binary tree (\c std::map).
     3030  ///
     3031  /// \ref IterableBoolMap and \ref IterableIntMap are similar classes
     3032  /// specialized for \c bool and \c int values, respectively.
    30043033  ///
    30053034  /// This type is not reference map, so it cannot be modified with
    3006   /// the subscription operator.
     3035  /// the subscript operator.
    30073036  ///
    30083037  /// \tparam GR The graph type.
     
    30803109    /// \brief Forward iterator for values.
    30813110    ///
    3082     /// This iterator is an stl compatible forward
     3111    /// This iterator is an STL compatible forward
    30833112    /// iterator on the values of the map. The values can
    30843113    /// be accessed in the <tt>[beginValue, endValue)</tt> range.
     
    30913120    public:
    30923121
     3122      /// Constructor
    30933123      ValueIterator() {}
    30943124
     3125      /// \e
    30953126      ValueIterator& operator++() { ++it; return *this; }
     3127      /// \e
    30963128      ValueIterator operator++(int) {
    30973129        ValueIterator tmp(*this);
     
    31003132      }
    31013133
     3134      /// \e
    31023135      const Value& operator*() const { return it->first; }
     3136      /// \e
    31033137      const Value* operator->() const { return &(it->first); }
    31043138
     3139      /// \e
    31053140      bool operator==(ValueIterator jt) const { return it == jt.it; }
     3141      /// \e
    31063142      bool operator!=(ValueIterator jt) const { return it != jt.it; }
    31073143
     
    31123148    /// \brief Returns an iterator to the first value.
    31133149    ///
    3114     /// Returns an stl compatible iterator to the
     3150    /// Returns an STL compatible iterator to the
    31153151    /// first value of the map. The values of the
    31163152    /// map can be accessed in the <tt>[beginValue, endValue)</tt>
     
    31223158    /// \brief Returns an iterator after the last value.
    31233159    ///
    3124     /// Returns an stl compatible iterator after the
     3160    /// Returns an STL compatible iterator after the
    31253161    /// last value of the map. The values of the
    31263162    /// map can be accessed in the <tt>[beginValue, endValue)</tt>
Note: See TracChangeset for help on using the changeset viewer.