Opened 15 years ago
Closed 15 years ago
#1072 closed Bugs (fixed)
assertion failed in dijkstra algorithm
Reported by: | Owned by: | doug_gregor | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.34.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
a call to dijkstra_shortest_paths fails with the following assertion:
/usr/include/boost/pending/relaxed_heap.hpp:175: IndexedType& boost::relaxed_heap<IndexedType, Compare, ID>::top() [with IndexedType = int, Compare = boost::indirect_cmp<boost::STempNodeMap<double>, std::less<double> >, ID = boost::SVertexIndexMap]: Assertion `smallest_value->value != 0' failed.
It happens if a valid vertex_descriptor in my graph is 0, which shouldn't be a problem as I define null_vertex() in my graph_traits to return -1.
I have checked the code in relaxed_heap, and though I don't really understand how it works, I don't see any reason why this assertion shouldn't be assert(smallest_value != 0) instead.
Everything works fine if I increase all my vertex_descriptors by 1, but I don't see why I can't have a valid vertex_descriptor which is 0.
Change History (2)
comment:1 by , 15 years ago
Owner: | set to |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [38330]) relaxed_heap.hpp: