Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#480 closed Bugs (Fixed)

dijkstra_shortest_path doesn't scan the whole component

Reported by: dooms Owned by: Douglas Gregor
Milestone: Component: graph
Version: None Severity:
Keywords: Cc:

Description

Disjkstra Shortest path stops in the middle of the graph.  
I think this is because of a bug in relaxed_heap.  
 
This bug is present in boost 1.33 and boost cvs HEAD. 
It is however not present in debian boost-graph-dev 
version 1.32.0-6. 
 
I attach a source code which demonstrates the bug. 
It produces a dot file with the nodes labeled with 
distances from the source and the arcs labeled with their 
weight. The bug is present if some nodes have a 
2147483647 label. 
 
 

Change History (3)

comment:1 by Douglas Gregor, 17 years ago

Logged In: YES 
user_id=249098

I was able to reproduce this problem on x86 Linux but not on PowerPC 
MacOS X. This is extremely important for 1.33.1.

comment:2 by Douglas Gregor, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=249098

The problem was due to rounding issues in the computation of the base-2 
logarithm of the size_type. I've replaced the calls to std::log(double) with a 
hand-rolled integer log2. The test passes for me on x86 Linux and PPC 
Mac OS X. The fixes are available on RC_1_33_0 and CVS HEAD.

comment:3 by Douglas Gregor, 17 years ago

Logged In: YES 
user_id=249098

The problem was due to rounding issues in the computation of the base-2 
logarithm of the size_type. I've replaced the calls to std::log(double) with a 
hand-rolled integer log2. The test passes for me on x86 Linux and PPC 
Mac OS X. The fixes are available on RC_1_33_0 and CVS HEAD.
Note: See TracTickets for help on using tickets.