Re: Better median function?
- Posted by Tor Gausen <tor.gausen at C2I.NET> Jun 10, 2000
- 445 views
Rolf, > Tor, what do you mean with 'median'? There are lots of > possibilities to define median. Sorry for the short delay. Thanks for the code snippets. With 'median' I mean 'statistical median', the middle value in a distribution, rather than the average. The simple (and probably inefective) way to do this is what I do now; sort the sequence and return the element in the middle. But is it really necessary to sort the entire sequence just to find which value will end up in the middle? That is my question; I'm looking for a faster way to find the median than by sorting. Thanks, Tor