COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/maps.h

    r28 r51  
    33 * This file is a part of LEMON, a generic C++ optimization library
    44 *
    5  * Copyright (C) 2003-2007
     5 * Copyright (C) 2003-2008
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    4242    {
    4343    public:
    44       /// Map's key type.
    45       typedef K Key;   
    46       /// Map's value type. (The type of objects associated with the keys).
     44      /// The key type of the map.
     45      typedef K Key;   
     46      /// The value type of the map. (The type of objects associated with the keys).
    4747      typedef T Value;
    4848
    4949      /// Returns the value associated with a key.
    5050
     51      /// Returns the value associated with a key.
    5152      /// \bug Value shouldn't need to be default constructible.
    5253      ///
     
    8283    {
    8384    public:
    84       /// Map's key type.
    85       typedef K Key;   
    86       /// Map's value type. (The type of objects associated with the keys).
     85      /// The key type of the map.
     86      typedef K Key;   
     87      /// The value type of the map. (The type of objects associated with the keys).
    8788      typedef T Value;
    8889
     
    114115    };
    115116
    116     /// Read/Writable map concept
     117    /// Read/writable map concept
    117118   
    118119    /// Read/writable map concept.
     
    120121    template<typename K, typename T>
    121122    class ReadWriteMap : public ReadMap<K,T>,
    122                             public WriteMap<K,T>
    123     {
    124     public:
    125       /// Map's key type.
    126       typedef K Key;   
    127       /// Map's value type. (The type of objects associated with the keys).
     123                         public WriteMap<K,T>
     124    {
     125    public:
     126      /// The key type of the map.
     127      typedef K Key;   
     128      /// The value type of the map. (The type of objects associated with the keys).
    128129      typedef T Value;
    129130
     
    147148    /// Dereferable map concept.
    148149    ///
     150    /// \todo Rethink this concept.
    149151    template<typename K, typename T, typename R, typename CR>
    150152    class ReferenceMap : public ReadWriteMap<K,T>
     
    153155      /// Tag for reference maps.
    154156      typedef True ReferenceMapTag;
    155       /// Map's key type.
    156       typedef K Key;   
    157       /// Map's value type. (The type of objects associated with the keys).
    158       typedef T Value;
    159       /// Map's reference type.
     157      /// The key type of the map.
     158      typedef K Key;   
     159      /// The value type of the map. (The type of objects associated with the keys).
     160      typedef T Value;
     161      /// The reference type of the map.
    160162      typedef R Reference;
    161       /// Map's const reference type.
     163      /// The const reference type of the map.
    162164      typedef CR ConstReference;
    163165
     
    166168    public:
    167169
    168       ///Returns a reference to the value associated to a key.
     170      ///Returns a reference to the value associated with a key.
    169171      Reference operator[](const Key &) { return tmp; }
    170       ///Returns a const reference to the value associated to a key.
     172      ///Returns a const reference to the value associated with a key.
    171173      ConstReference operator[](const Key &) const { return tmp; }
    172174      /// Sets the value associated with a key.
    173175      void set(const Key &k,const Value &t) { operator[](k)=t; }
    174176
    175       /// \todo Rethink this concept.
    176177      template<typename _ReferenceMap>
    177178      struct ReferenceMapConcept {
Note: See TracChangeset for help on using the changeset viewer.