| Thread overview | |||||
|---|---|---|---|---|---|
|
February 13, 2009 nth_element implementation? | ||||
|---|---|---|---|---|
| ||||
Hi all, 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. thanks, wade | ||||
February 13, 2009 Re: nth_element implementation? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to wade | wade wrote:
> Hi all,
>
> 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.
>
> thanks, wade
The function is called topN in std.algorithm and still exists as far as I know. I did temporarily comment it out while working on the new std.algorithm, but I don't think I ever checked that in.
If there are bugs pertinent to 2.0, I'd appreciate a bugzilla entry about it.
Andrei
| |||
February 13, 2009 Re: nth_element implementation? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to wade | 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 | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply