COIN-OR::LEMON - Graph Library

Changeset 897:ef09eee53b09 in lemon-0.x for src/hugo/vector_map.h


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

The default constructors are removed from the maps.
The ArrayMap? is the map structure of the graphs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/vector_map.h

    r891 r897  
    7070    typedef typename Container::const_pointer ConstPointerType;
    7171
    72     /** Default constructor for the map.
    73      */
    74     VectorMap() {}
    75                
    7672    /** Graph and Registry initialized map constructor.
    7773     */
     
    9995    template <typename TT>
    10096    VectorMap& operator=(const VectorMap<MapRegistry, TT>& c) {
    101       container.resize(c.container.size());
    102       MapBase::operator=(c);
     97      if (MapBase::getGraph() != c.getGraph()) {
     98        MapBase::operator=(c);
     99        container.resize(c.container.size());
     100      }
    103101      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
    104102        int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
Note: See TracChangeset for help on using the changeset viewer.