On Thursday 15 December 2005 11:50, Joel Reymont wrote: > Does anyone have priority queue Haskell code that they would be > willing to share or point me to?
In fact I have one. It is based on 2-3 finger trees as described in a paper by Ralf Hinze. it is even better because it is a ordered sequence data type, rather than just a priority queue: all operations are constant time at both ends (max resp.min end). It is also quite memory efficient (last time I checked, it used about half the memory compared to data.Set). I can send you the sources (today, evening, can't access it at work). Ben _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe