Array-Heap reviews

RSS | Module Info | Add a review of Array-Heap

Array-Heap (0.01) *****

The module is a very simple and easy to use implementation of binary heap partial ordering on an array.

The only part lacking is the number of additional utility functions. For example, I'm trying to clip a priority queue, so I push an element, reverse the array, perform make_heap with an inverse comparison, pop an element with an inverse comparison, and reverse the array again. This could be made simpler using reverse_make_heap, reverse_pop_heap, which will enable treating the array as a heap, with the same comparison function, from the other end, so that big elements bubble that way, and you can remove them from there. I guess I could think of a number of other useful functions which are better implemented at the module level.

Otherwise jolly good show, and keep up the good work!
1 hidden unhelpful review