Opened 11 years ago
Closed 11 years ago
#5779 closed Bugs (invalid)
Bug in Boost BGL graph traversal
Reported by: | Owned by: | Jeremiah Willcock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.42.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
Using listS as the representation for both vertices and edges, BGL's depth_first_search sometimes calls back_edge() on visitors even if there are no cycles in the graph.
Code example: http://static.ali01.com/bgl.cc
The above program should not print "back edge", but does.
Attachments (1)
Change History (2)
by , 11 years ago
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You are not initializing the vertex_index
property of your graph. Try adding some code such as:
graph_traits<Graph>::vertices_size_type i = 0; BGL_FORALL_VERTICES(v, graph, Graph) put(vertex_index, g, v, i++);
before your call to depth_first_search
(filling in the types for your code, and #include
ing <boost/graph/iteration_macros.hpp>
).
Note:
See TracTickets
for help on using tickets.
code example of bug