COIN-OR::LEMON - Graph Library

Ticket #195: b0f74ca2e3ac.patch

File b0f74ca2e3ac.patch, 1.1 KB (added by Peter Kovacs, 16 years ago)
  • lemon/core.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1229114242 -3600
    # Node ID b0f74ca2e3ac2d7e7a63795d086d499323da8f0e
    # Parent  62f9787c516c468a3676bb7a91731da83aa64543
    Bug fix in ConEdgeIt (#195)
    
    diff --git a/lemon/core.h b/lemon/core.h
    a b  
    11701170    ///
    11711171    /// Construct a new ConEdgeIt iterating on the edges that
    11721172    /// connects nodes \c u and \c v.
    1173     ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g) {
    1174       Parent::operator=(findEdge(_graph, u, v));
     1173    ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g), _u(u), _v(v) {
     1174      Parent::operator=(findEdge(_graph, _u, _v));
    11751175    }
    11761176
    11771177    /// \brief Constructor.
     
    11831183    ///
    11841184    /// It increments the iterator and gives back the next edge.
    11851185    ConEdgeIt& operator++() {
    1186       Parent::operator=(findEdge(_graph, _graph.u(*this),
    1187                                  _graph.v(*this), *this));
     1186      Parent::operator=(findEdge(_graph, _u, _v, *this));
    11881187      return *this;
    11891188    }
    11901189  private:
    11911190    const Graph& _graph;
     1191    Node _u, _v;
    11921192  };
    11931193
    11941194