Re: Better median function?

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu