COIN-OR::LEMON - Graph Library

Changeset 1454:e0177bbe75a9 in lemon-0.x


Ignore:
Timestamp:
06/08/05 22:52:18 (14 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1934
Message:

Bugfixes to compile w. gcc 4.0.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_utils.h

    r1453 r1454  
    864864  template <typename _Graph>
    865865  class InDegMap  :
    866     protected _Graph::AlterationNotifier<typename _Graph::Node>::
     866    protected _Graph::template AlterationNotifier<typename _Graph::Node>::
    867867    ObserverBase,
    868     protected _Graph::AlterationNotifier<typename _Graph::Edge>::
     868    protected _Graph::template AlterationNotifier<typename _Graph::Edge>::
    869869    ObserverBase
    870870  {
     
    880880    InDegMap(const _Graph& _graph) : graph(_graph), deg(graph,0)
    881881    {
    882       typename _Graph::AlterationNotifier<typename _Graph::Node>::ObserverBase::
    883         attach(graph->getNotifier(typename _Graph::Node()));
    884       typename _Graph::AlterationNotifier<typename _Graph::Edge>::ObserverBase::
    885         attach(graph->getNotifier(typename _Graph::Edge()));
    886 
    887       for(typename _Graph::NodeIt n(g);n!=INVALID;++n)
    888         for(typename _Graph::InEdgeIt e(g,n);e!=INVALID;++e)
     882      typename _Graph::template AlterationNotifier<typename _Graph::Node>
     883        ::ObserverBase::attach(graph->getNotifier(typename _Graph::Node()));
     884      typename _Graph::template AlterationNotifier<typename _Graph::Edge>
     885        ::ObserverBase::attach(graph->getNotifier(typename _Graph::Edge()));
     886
     887      for(typename _Graph::NodeIt n(graph);n!=INVALID;++n)
     888        for(typename _Graph::InEdgeIt e(graph,n);e!=INVALID;++e)
    889889          deg[e]++;
    890890    }
     
    892892    ~InDegMap()
    893893    {
    894       typename _Graph::AlterationNotifier<typename _Graph::Node>::
     894      typename _Graph::template AlterationNotifier<typename _Graph::Node>::
    895895        ObserverBase::detach();
    896       typename _Graph::AlterationNotifier<typename _Graph::Edge>::
     896      typename _Graph::template AlterationNotifier<typename _Graph::Edge>::
    897897        ObserverBase::detach();
    898898    }
     
    905905      ///\bug Which 'add' comes before to other?
    906906      deg[n]=0;
    907     };
     907    }
    908908    virtual void erase(const typename _Graph::Node&)
    909909    {
    910910    }
    911     virtual void add(const typename _Graph::Edge& n) {
     911    virtual void add(const typename _Graph::Edge& e) {
    912912      deg[graph.target(e)]++;
    913     };
    914     virtual void erase(const typename _Graph::Edge&)
    915     {
     913    }
     914    virtual void erase(const typename _Graph::Edge& e) {
    916915      deg[graph.target(e)]--;
    917916    }
Note: See TracChangeset for help on using the changeset viewer.