nth_element implementation?
bearophile
bearophileHUGS at lycos.com
Fri Feb 13 07:44:18 PST 2009
wade:
> Does anybody have an efficient nth_element implementation (ala the STL) for D 1.0. I was using the version from algortihms.d in DMD 2.012 but that seems to be non-existent anymore and was quite buggy.
Do you mean to find the n-th ordered item, ranking? If so, there's a function in my dlibs too:
http://www.fantascienza.net/leonardo/so/dlibs/ranking.html
The code is for D1+Phobos:
http://www.fantascienza.net/leonardo/so/libs_d.zip
Bye,
bearophile
More information about the Digitalmars-d
mailing list