COIN-OR::LEMON - Graph Library

Changeset 897:ef09eee53b09 in lemon-0.x for src/hugo/default_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/default_map.h

    r891 r897  
    3838typedef typename MapRegistry::Graph Graph; \
    3939\
    40 DefaultMap() : Parent() {} \
    4140DefaultMap(const Graph& g, MapRegistry& r) : Parent(g, r) {} \
    4241DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
     
    4544  : Parent(static_cast<const Parent&>(copy)) {} \
    4645template <typename TT> \
    47 DefaultMap(const DefaultMap<MapRegistry, TT>& copy) { \
     46DefaultMap(const DefaultMap<MapRegistry, TT>& copy) \
     47  : { \
    4848  Parent::MapBase::operator= \
    4949    (static_cast<const typename Parent::MapBase&>(copy)); \
     
    6161template <typename TT> \
    6262DefaultMap& operator=(const DefaultMap<MapRegistry, TT>& copy) { \
    63   Parent::clear(); \
    64   Parent::MapBase::operator=(copy); \
     63  if (Parent::getGraph() != copy.getGraph()) { \
     64    Parent::clear(); \
     65    Parent::MapBase::operator=(copy); \
     66    Parent::construct(); \
     67  } \
    6568  if (Parent::getGraph()) { \
    6669    for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
    67       Parent::add(it); \
    6870      Parent::operator[](it) = copy[it]; \
    6971    } \
Note: See TracChangeset for help on using the changeset viewer.