[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #4 from Martin Nowak --- Your work seems pretty useful, care to convert it into a PR? --
[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 greenify changed: What|Removed |Added CC||greeen...@gmail.com --- Comment #5 from greenify --- nice idea @bearophile and @SzMK - how about sharing it as a PR? --
[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 --- Comment #6 from SzMK --- pull https://github.com/D-Programming-Language/phobos/pull/4061 --
[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/6b165d4deb110d5311131eb61b99895d6ef36297 Fix issue 10777 - multiSort should return a SortedRange https://github.com/dlang/phobos/commit/72fdea91e0451c814ec3bcc6c6fc8bc51a75096f Merge pull request #4235 from wilzbach/multisort_with_pred Fix issue 10777 - multiSort should return a SortedRange --
[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 SzMK changed: What|Removed |Added CC||szymon.kielbasa+dlang@gmail ||.com --- Comment #1 from SzMK --- I often use multiSort in bioinformatics applications. To make multiSort more usable I (hopefully carefully) extended the range.d and algorithm.d code (of 2.065) to add the following functionality: - SortedRange has been extended to support one or more predicates; it internally constructs the full predicate function out of separately provided ones - multiSort has been converted to return the modified SortedRange object - assumeSorted has been modified to handle multiple predicates The existing unittests do compile without any modifications; a few new ones have been added. The above changes are mostly of cosmetics nature. But my primary motivation was to provide possibility to perform binary searches with equalRange family of functions based not only on all predicates, but also on a subset of leading ones (an example: a range of persons, sorted first by surnames and then by given names should provide possibility to find a range of persons with requested (surname and given name) as well as a range of persons with requested surname). To achieve that I added: - SortedRange.keepPreds!( numPreds ) function which returns the same range annotated as SortedRange with possibly a smaller number of predicates. --
[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 --- Comment #2 from SzMK --- Created attachment 1377 --> https://issues.dlang.org/attachment.cgi?id=1377&action=edit range.d with SortedRange changes --
[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange
https://issues.dlang.org/show_bug.cgi?id=10777 --- Comment #3 from SzMK --- Created attachment 1378 --> https://issues.dlang.org/attachment.cgi?id=1378&action=edit algorithm.d with multiSort changes --