Select using MArray
6 Sep
2004
6 Sep
'04
2:48 p.m.
Hi, I found myself needing to quickly and effectively compute the median of an array of ordered elements (read as: I want to build a perfectly balanced kD-tree). Of course there was a nice imperative one, implemented for language "so-and-so" and "this-and-that" but I couldn't find a Haskell implementation. So I'd thought I'd give it a go. I used (Select by Floyd and Rivest): http://portal.acm.org/citation.cfm?id=360694 wich is mainly targeted for Algol. It turns out that it works rather nice so I thought I'd post it here so that it could evolve even further (or be re-implemented), see attachment. /Andreas
8026
Age (days ago)
8026
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andreas Farre