Re: [Boost-bugs] [Boost C++ Libraries] #9770: Finish_edge event misbehavior.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9770: Finish_edge event misbehavior.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-11 18:07:44


#9770: Finish_edge event misbehavior.
-------------------------------+----------------------
  Reporter: edwin.carlinet@… | Owner: jewillco
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: graph
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------

Comment (by edwin.carlinet@…):

 The fix I proposed a few hours ago is just as wrong as the original code.
 The problem is still related to the source edge but not in the way I
 thought: the source edge inserted in the stack is not the right one.

 Hope that this really fix the problem.
 {{{
 @@ -25,6 +25,7 @@
  #include <boost/parameter.hpp>
  #include <boost/concept/assert.hpp>
  #include <boost/tti/has_member_function.hpp>
 +#include <boost/utility.hpp>

  #include <vector>
  #include <utility>
 @@ -143,8 +144,8 @@
            ColorValue v_color = get(color, v);
            if (v_color == Color::white()) {
              vis.tree_edge(*ei, g);
 + stack.push_back(std::make_pair(u, std::make_pair(src_e,
 std::make_pair(boost::next(ei), ei_end))));
              src_e = *ei;
 - stack.push_back(std::make_pair(u, std::make_pair(src_e,
 std::make_pair(++ei, ei_end))));
              u = v;
              put(color, u, Color::gray());
              vis.discover_vertex(u, g);
 }}}

 The outputs of the test code attached below makes more sense:
 {{{
 Finish vertex: 3
 Finish edge: (1,3)
 Finish vertex: 1
 Finish edge: (0,1)
 Finish edge: (2,3)
 Finish vertex: 2
 Finish edge: (0,2)
 Finish vertex: 0
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9770#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC