COIN-OR::LEMON - Graph Library

Changeset 937:d4e911acef3d in lemon-0.x for src/lemon/vector_map.h


Ignore:
Timestamp:
10/04/04 19:13:21 (20 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1264
Message:

Revert backport changes -r1230.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/vector_map.h

    r921 r937  
    3232  /// @{
    3333 
    34   /** The ArrayMap template class is graph map structure what
     34  /** The VectorMap template class is graph map structure what
    3535   *  automatically updates the map when a key is added to or erased from
    3636   *  the map. This map factory uses the allocators to implement
     
    3838   *  uses the std::vector to implement the container function.
    3939   *
    40    *  The template parameter is the MapRegistry that the maps
    41    *  will belong to and the ValueType.
     40   *  \param MapRegistry The MapRegistry that the maps will belong to.
     41   *  \param Value The value type of the map.
    4242   *
    43    * \todo It should use a faster initialization using the maxNodeId() or
    44    * maxEdgeId() function of the graph instead of iterating through each
    45    * edge/node.
     43   *  \author Balazs Dezso
    4644   */
    4745       
     
    8583    typedef typename Container::const_pointer ConstPointerType;
    8684
    87     /** Graph and Registry initialized map constructor.
     85    /// Constructor to attach the new map into a registry.
     86
     87    /** Constructor to attach the new map into a registry.
     88     *  It adds all the nodes or edges of the graph to the map.
    8889     */
    8990    VectorMap(const Graph& g, MapRegistry& r)
    9091      : MapBase(g, r), container(KeyInfo<Graph, KeyIt>::maxId(g)+1) {}
    9192
    92     /** Constructor to use default value to initialize the map.
     93    /// Constructor uses given value to initialize the map.
     94
     95    /** Constructor uses given value to initialize the map.
     96     *  It adds all the nodes or edges of the graph to the map.
    9397     */
    9498    VectorMap(const Graph& g, MapRegistry& r, const Value& v)
    9599      : MapBase(g, r), container(KeyInfo<Graph, KeyIt>::maxId(g)+1, v) {}
    96100
     101    /// Assign operator to copy a map of an other map type.
     102
    97103    /** Assign operator to copy a map of an other map type.
     104     *  This map's value type must be assignable by the other
     105     *  map type's value type.
    98106     */
    99107    template <typename TT>
     
    106114    }
    107115
     116    /// Assign operator to copy a map of an other map type.
     117
    108118    /** Assign operator to copy a map of an other map type.
     119     *  This map's value type must be assignable by the other
     120     *  map type's value type.
    109121     */
    110122    template <typename TT>
     
    120132      return *this;
    121133    }
     134
     135    /// The subcript operator.
     136
    122137    /**
    123138     * The subscript operator. The map can be subscripted by the
     
    129144    }
    130145               
     146    /// The const subcript operator.
     147
    131148    /**
    132149     * The const subscript operator. The map can be subscripted by the
     
    138155    }
    139156
     157    ///Setter function of the map.
     158
    140159    /** Setter function of the map. Equivalent with map[key] = val.
    141160     *  This is a compatibility feature with the not dereferable maps.
     
    145164      container[id] = val;
    146165    }
    147                
    148     /** Add a new key to the map. It called by the map registry.
     166    /// Adds a new key to the map.
     167               
     168    /** Adds a new key to the map. It called by the map registry
     169     *  and it overrides the \ref MapRegistry::MapBase MapBase's
     170     *  add() member function.
    149171     */
    150172    void add(const KeyType& key) {
     
    154176      }
    155177    }
    156                
    157     /** Erase a key from the map. It called by the map registry.
     178
     179    /// Erases a key from the map.
     180               
     181    /** Erase a key from the map. It called by the map registry
     182     *  and it overrides the \ref MapRegistry::MapBase MapBase's
     183     *  erase() member function.
    158184     */
    159185    void erase(const KeyType& key) {}
    160186
    161     /** Clear the data structure.
    162      */
     187    /// Makes empty the map.
     188
     189    /** Makes empty the map. It called by the map registry
     190     *  and it overrides the \ref MapRegistry::MapBase MapBase's
     191     *  clear() member function.
     192     */
     193
    163194    void clear() {
    164195      container.clear();
Note: See TracChangeset for help on using the changeset viewer.