COIN-OR::LEMON - Graph Library

Changeset 1990:15fb7a4ea6be in lemon-0.x for lemon/graph_utils.h


Ignore:
Timestamp:
03/01/06 11:17:25 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2592
Message:

Some classes assumed that the GraphMaps? should be inherited
from an ObserverBase?. These classes parents replaced with
DefaultMap? which cause that the graph maps should not be
inherited from the ObserverBase?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_utils.h

    r1981 r1990  
    2929#include <lemon/maps.h>
    3030#include <lemon/traits.h>
     31
    3132#include <lemon/bits/alteration_notifier.h>
     33#include <lemon/bits/default_map.h>
    3234
    3335///\ingroup gutils
     
    901903  /// \param _Map A ReadWriteMap mapping from the item type to integer.
    902904  template <
    903     typename _Graph, typename _Item, typename _Value, typename _Map
    904     = typename ItemSetTraits<_Graph, _Item>::template Map<_Value>::Parent
     905    typename _Graph, typename _Item, typename _Value,
     906    typename _Map = DefaultMap<_Graph, _Item, _Value>
    905907  >
    906908#else
     
    11061108  /// \param _Map A ReadWriteMap mapping from the item type to integer.
    11071109  template <
    1108     typename _Graph, typename _Item, typename _Map
    1109     = typename ItemSetTraits<_Graph, _Item>::template Map<int>::Parent
     1110    typename _Graph, typename _Item,
     1111    typename _Map = DefaultMap<_Graph, _Item, int>
    11101112  >
    11111113#else
     
    15061508  private:
    15071509
    1508     class AutoNodeMap : public Graph::template NodeMap<int> {
     1510    class AutoNodeMap : public DefaultMap<_Graph, Key, int> {
    15091511    public:
    15101512
    1511       typedef typename Graph::template NodeMap<int> Parent;
    1512 
    1513       typedef typename Parent::Key Key;
    1514       typedef typename Parent::Value Value;
    1515      
     1513      typedef DefaultMap<_Graph, Key, int> Parent;
     1514
    15161515      AutoNodeMap(const Graph& graph) : Parent(graph, 0) {}
    15171516     
     
    16231622  private:
    16241623
    1625     class AutoNodeMap : public Graph::template NodeMap<int> {
     1624    class AutoNodeMap : public DefaultMap<_Graph, Key, int> {
    16261625    public:
    16271626
    1628       typedef typename Graph::template NodeMap<int> Parent;
    1629 
    1630       typedef typename Parent::Key Key;
    1631       typedef typename Parent::Value Value;
    1632      
     1627      typedef DefaultMap<_Graph, Key, int> Parent;
     1628
    16331629      AutoNodeMap(const Graph& graph) : Parent(graph, 0) {}
    16341630     
     
    16641660    }
    16651661   
    1666     /// Gives back the in-degree of a Node.
     1662    /// Gives back the out-degree of a Node.
    16671663    int operator[](const Key& key) const {
    16681664      return deg[key];
Note: See TracChangeset for help on using the changeset viewer.