Hi, In case anyone is interested in participating or consuming -- for use with clojure or otherwise:
Suggestions and requests are welcome: http://code.google.com/p/jc-pheap/ Summary (besides what's at the link): If only as an exercise, I've spent a little time coding up (in java right now) a paper by Brodal and Okasaki (origially found by googling) on a functional priority queue ( http://code.google.com/p/jc-pheap/source/browse/trunk/jc-pheap/src/persistent_heap/brodal_priority.pdf) with optimal worst-case runtimes. I think one thing I will do pretty soon is compare this approach (performance and memory) to just handing out copies of arrays to consumers (or some other imperative approach), but the idea/interface could be useful even then. The implementation under the hood would just change. I think this could end up being a good chance for me to start learning macros, too, to make use in clojure easy. Another thing that seems important is to try to figure out how to add decreaseKey() in a functional setting. Also, something I'm wondering about is how heaps fit into a lazy environment. I think of it as "semi-lazy" because some of the sorting work is delayed until values are needed (popped off the top), but it's not really like a typical stream processor/filter where only one or two elements need to be in memory at once. Finally, for fun, I'm in the middle of playing with the "data-structural bootstrapping" part of the paper (that code isn't checked in yet), but it's usefulness will depend on how important meld is to people (meld seems fast enough right now, maybe). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---