[Boost-bugs] [Boost C++ Libraries] #3506: Graph's Tour / Dijkstra's parent nodes

Subject: [Boost-bugs] [Boost C++ Libraries] #3506: Graph's Tour / Dijkstra's parent nodes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-03 21:46:51


#3506: Graph's Tour / Dijkstra's parent nodes
-------------------------------------+--------------------------------------
 Reporter: JDKunkMailing@… | Owner: asutton
     Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: graph
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 In the tour
 (http://www.boost.org/doc/libs/1_40_0/libs/graph/doc/quick_tour.html), the
 last step has me going through and finding all the parents of nodes in
 Dijkstra algorithm. However, the way the default constructor of Vertex()
 was set up, it could not find vertex 0 when the parent is 0. Specifically,
 p[*vi] == Vertex() returned true, when the parent was zero and when there
 is no parent.

 There are two ways to look at this problem.

 First, it is not a bug. Whoever uses the library should get used to
 working around this.

 Second, the default Vertex() should be denoted with an invalid id such
 that no valid vertex can be Vertex().


 I would prefer the latter, or another way to work around this issue.

 Vertex is
 typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;

 I used
 MSVC 9.0, Win32(Windows7), Intel x2 processors, ... what else?

 - Jeff Kunkel

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3506>
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:01 UTC