COIN-OR::LEMON - Graph Library

Changeset 125:19e82bda606a in lemon-1.0 for lemon/bits


Ignore:
Timestamp:
04/14/08 18:37:18 (12 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Fix bug #83 in graph concept, extender and smart graph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r107 r125  
    368368
    369369    Node oppositeNode(const Node &n, const Edge &e) const {
    370       if( n == Parent::source(e))
    371         return Parent::target(e);
    372       else if( n == Parent::target(e))
    373         return Parent::source(e);
     370      if( n == Parent::u(e))
     371        return Parent::v(e);
     372      else if( n == Parent::v(e))
     373        return Parent::u(e);
    374374      else
    375375        return INVALID;
     
    382382    using Parent::direct;
    383383    Arc direct(const Edge &edge, const Node &node) const {
    384       return Parent::direct(edge, Parent::source(edge) == node);
     384      return Parent::direct(edge, Parent::u(edge) == node);
    385385    }
    386386
     
    587587    /// Returns the base node of the iterator
    588588    Node baseNode(const IncEdgeIt &edge) const {
    589       return edge._direction ? source(edge) : target(edge);
     589      return edge._direction ? u(edge) : v(edge);
    590590    }
    591591    /// Running node of the iterator
     
    593593    /// Returns the running node of the iterator
    594594    Node runningNode(const IncEdgeIt &edge) const {
    595       return edge._direction ? target(edge) : source(edge);
     595      return edge._direction ? v(edge) : u(edge);
    596596    }
    597597
Note: See TracChangeset for help on using the changeset viewer.