Boost Graph Library's prim_minimum_spanning_tree function has a problem in version 1.55.0
The function "prim_minimum_spanning_tree" has a problem in Boost Graph Library in version 1.55.0. The prim_minimum_spanning_tree is giving an exception "e boost::negative_edge & 0x00007fff5fbfe1a0 0x00007fff5fbfe1a0", a negative edge cost exception even thought all edge cost are positive. I have a simple example with all positive edge costs and I attached the script for the demonstration purpose. Meanwhile, this function has no problems when it is called in version 1.53.0. For the attached example script, I called the function in both versions. I obtained a correct solution with version 1.53.0. However version 1.55.0 throws a negative edge cost exception.
Change History
(9)
Component: |
None → graph
|
Owner: |
set to Jeremiah Willcock
|
Resolution: |
→ invalid
|
Status: |
new → closed
|
Resolution: |
invalid
|
Status: |
closed → reopened
|
Resolution: |
→ worksforme
|
Status: |
reopened → closed
|
I do not get an exception from either of those programs (GCC 4.9 snapshot on Linux). Which compiler are you using? If it's VC++, try using:
instead of
&p[0]
in your argument list toprim_minimum_spanning_tree
.