lemon/graph_utils.h
changeset 2622 fa2877651022
parent 2569 12c2c5c4330b
equal deleted inserted replaced
73:ffdc264a9d23 74:3930bc985b3d
  2704 	  }
  2704 	  }
  2705 	  splay(s);
  2705 	  splay(s);
  2706 	} else {
  2706 	} else {
  2707 	  _right.set(e, _right[edge]);
  2707 	  _right.set(e, _right[edge]);
  2708 	  _parent.set(_right[edge], e);
  2708 	  _parent.set(_right[edge], e);
  2709 
  2709 	  _parent.set(e, _parent[edge]);
       
  2710 	  
  2710 	  if (_parent[edge] != INVALID) {
  2711 	  if (_parent[edge] != INVALID) {
  2711 	    if (_left[_parent[edge]] == edge) {
  2712 	    if (_left[_parent[edge]] == edge) {
  2712 	      _left.set(_parent[edge], e);
  2713 	      _left.set(_parent[edge], e);
  2713 	    } else {
  2714 	    } else {
  2714 	      _right.set(_parent[edge], e);
  2715 	      _right.set(_parent[edge], e);
  2834     ///\return An edge from \c s to \c t if there exists,
  2835     ///\return An edge from \c s to \c t if there exists,
  2835     ///\ref INVALID otherwise.
  2836     ///\ref INVALID otherwise.
  2836     Edge operator()(Node s, Node t) const
  2837     Edge operator()(Node s, Node t) const
  2837     {
  2838     {
  2838       Edge e = _head[s];
  2839       Edge e = _head[s];
       
  2840       if (e == INVALID) return INVALID;
  2839       while (true) {
  2841       while (true) {
  2840 	if (_g.target(e) == t) {
  2842 	if (_g.target(e) == t) {
  2841 	  const_cast<DynEdgeLookUp&>(*this).splay(e);
  2843 	  const_cast<DynEdgeLookUp&>(*this).splay(e);
  2842 	  return e;
  2844 	  return e;
  2843 	} else if (t < _g.target(e)) {
  2845 	} else if (t < _g.target(e)) {