Array-Heap reviews

cpanratings
 

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!

יובל קוג'מן - 2003-10-08T05:27:21 (permalink)

0 out of 1 found this review helpful. Was this review helpful to you?  Yes No
1 hidden unhelpful review