Opened 5 years ago
#13427 new Bugs
Boost::binomial_heap - decrease bug
Reported by: | adtac | Owned by: | timblechmann |
---|---|---|---|
Milestone: | To Be Determined | Component: | heap |
Version: | Boost 1.63.0 | Severity: | Regression |
Keywords: | heap binomial_heap | Cc: |
Description
Hello. I was messing around with boost::binomial_heap today and I think I may have found a bug. Essentially, when I construct a min-heap with binomial_heap, insert elements, and decrease an element to become the smallest, it's not at the top.
I've attached a small enough reproducer. Here's the result on execution: http://coliru.stacked-crooked.com/a/28fe3afdedda9d76
As you may see, the output should be:
-1 1 1 2 3 4
Indeed, this is the output in the case of boost::fibonacci_heap and boost::pairing_heap. However, in the case of boost::binomial_heap, the output is:
1 -1 1 2 3 4
Attachments (1)
Note:
See TracTickets
for help on using tickets.
Reproducer