penemue/keap

Heap property can be broken since 0.2.0

Closed this issue · 0 comments

Since version 0.2.0, compacted tournament tree can lose heap property in some cases. The problem happens for enough large queue if neighbor elements (with even and odd indices) are swapped and the new even element is not sifted up to the root. For compacted tournament tree, there should not be breakable sifting up procedure, all elements should always be sifted up to the root.