COIN-OR::LEMON - Graph Library

Changeset 1456:5289afbdb720 in lemon-0.x for lemon/maps.h


Ignore:
Timestamp:
06/09/05 11:46:34 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1936
Message:

Trivial doc fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r1439 r1456  
    147147
    148148  public:
     149    ///\e
    149150    typedef K Key;
     151    ///\e
    150152    typedef T Value;
     153    ///\e
    151154    typedef T& Reference;
     155    ///\e
    152156    typedef const T& ConstReference;
    153157
     
    227231    typedef True NeedCopy;
    228232
     233    ///\e
    229234    typedef typename M::Key Key;
     235    ///\e
    230236    typedef T Value;
    231237
     
    272278    typedef True NeedCopy;
    273279
     280    ///\e
    274281    typedef typename M1::Key Key;
     282    ///\e
    275283    typedef typename M1::Value Value;
    276284
     
    319327
    320328    typedef True NeedCopy;
     329    ///\e
    321330    typedef typename M::Key Key;
     331    ///\e
    322332    typedef typename M::Value Value;
    323333
     
    357367
    358368    typedef True NeedCopy;
     369    ///\e
    359370    typedef typename M1::Key Key;
     371    ///\e
    360372    typedef typename M1::Value Value;
    361373
     
    395407
    396408    typedef True NeedCopy;
     409    ///\e
    397410    typedef typename M1::Key Key;
     411    ///\e
    398412    typedef typename M1::Value Value;
    399413
     
    439453
    440454    typedef True NeedCopy;
     455    ///\e
    441456    typedef typename M::Key Key;
     457    ///\e
    442458    typedef typename M::Value Value;
    443459
     
    477493
    478494    typedef True NeedCopy;
     495    ///\e
    479496    typedef typename M1::Key Key;
     497    ///\e
    480498    typedef typename M1::Value Value;
    481499
     
    523541
    524542    typedef True NeedCopy;
     543    ///\e
    525544    typedef typename M2::Key Key;
     545    ///\e
    526546    typedef typename M1::Value Value;
    527547
     
    576596
    577597    typedef True NeedCopy;
     598    ///\e
    578599    typedef typename M1::Key Key;
     600    ///\e
    579601    typedef V Value;
    580602
     
    625647
    626648    typedef True NeedCopy;
     649    ///\e
    627650    typedef typename M::Key Key;
     651    ///\e
    628652    typedef typename M::Value Value;
    629653
     
    677701
    678702    typedef True NeedCopy;
     703    ///\e
    679704    typedef typename M::Key Key;
     705    ///\e
    680706    typedef typename M::Value Value;
    681707
     
    718744
    719745    typedef True NeedCopy;
     746    ///\e
    720747    typedef K Key;
     748    ///\e
    721749    typedef V Value;
    722750
     
    757785
    758786    typedef True NeedCopy;
     787    ///\e
    759788    typedef typename M::Key argument_type;
     789    ///\e
    760790    typedef typename M::Value result_type;
     791    ///\e
    761792    typedef typename M::Key Key;
     793    ///\e
    762794    typedef typename M::Value Value;
    763795
     
    807839
    808840    typedef True NeedCopy;
     841    ///\e
    809842    typedef typename M1::Key Key;
     843    ///\e
    810844    typedef typename M1::Value Value;
    811845
     
    832866  }
    833867
     868
     869 
     870  /* ************* BOOL MAPS ******************* */
     871 
     872  ///Logical 'not' of a map
     873 
     874  ///This bool \ref concept::ReadMap "read only map" returns the
     875  ///logical negation of
     876  ///value returned by the
     877  ///given map. Its \c Key and will be inherited from \c M,
     878  ///its Value is <tt>bool</tt>.
     879
     880  template<class M>
     881  class NotMap
     882  {
     883    typename SmartConstReference<M>::Type m;
     884  public:
     885
     886    typedef True NeedCopy;
     887    ///\e
     888    typedef typename M::Key Key;
     889    ///\e
     890    typedef bool Value;
     891
     892    ///Constructor
     893
     894    ///\e
     895    ///
     896    NotMap(const M &_m) : m(_m) {};
     897    Value operator[](Key k) const {return !m[k];}
     898  };
     899 
     900  ///Returns a \ref NotMap class
     901 
     902  ///This function just returns a \ref NotMap class.
     903  ///\relates NotMap
     904  template<class M>
     905  inline NotMap<M> notMap(const M &m)
     906  {
     907    return NotMap<M>(m);
     908  }
     909
     910
     911
     912
     913
     914
     915
     916
     917
     918
     919
    834920  /// @}
    835  
    836921}
    837922
    838 
    839923#endif // LEMON_MAPS_H
Note: See TracChangeset for help on using the changeset viewer.