Re: Heap implementation in Clojure

2010-02-03 Thread e
If "normal" is a binary heap with log(n) for most things, no. This is better. You can check out the paper(s) I based it on included in the project. It has runtimes equivalent to Fibonacci Heap except that Fib-Heaps only have amortized worst case. insert: O(1) findMin: O(1) meld: <--- i don't rem

Re: Heap implementation in Clojure

2010-02-02 Thread ajay gopalakrishnan
What is the time and space complexity for your implementation? Equals the normal non-functional implementation? On Tue, Feb 2, 2010 at 7:31 AM, e wrote: > i was messing around a while back with this: > http://code.google.com/p/jc-pheap/ > > the algorithms work, but it's probably in a between-sta

Re: Heap implementation in Clojure

2010-02-02 Thread e
i was messing around a while back with this: http://code.google.com/p/jc-pheap/ the algorithms work, but it's probably in a between-state. I wasn't sure what the interface should look like exactly, and I was recently adding support for duplicate keys (but I wasn't sure if I should have two struct

Re: Heap implementation in Clojure

2009-12-15 Thread ataggart
On Dec 15, 1:49 am, ataggart wrote: > On Dec 14, 5:48 am, Mark Tomko wrote: > > > I wrote this implementation of a heap (or priority queue) in pure > > Clojure: > > >http://pastebin.com/m2ab1ad5a > > > It's probably not of any quality sufficient to be make it to the > > contrib package, but it

Re: Heap implementation in Clojure

2009-12-15 Thread ataggart
On Dec 14, 5:48 am, Mark Tomko wrote: > I wrote this implementation of a heap (or priority queue) in pure > Clojure: > > http://pastebin.com/m2ab1ad5a > > It's probably not of any quality sufficient to be make it to the > contrib package, but it seems to work.  Any thoughts on how it might > be