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)

reproducer.cpp (550 bytes ) - added by adtac 5 years ago.
Reproducer

Download all attachments as: .zip

Change History (1)

by adtac, 5 years ago

Attachment: reproducer.cpp added

Reproducer

Note: See TracTickets for help on using tickets.