Re: Sorted ranges in combined sorted order?

2017-01-05 Thread Ali Çehreli via Digitalmars-d-learn
On 12/31/2016 02:28 PM, Matthew Gamble wrote: > Please let me know if you have any suggestions. I've seen this just now. Random and trivial observations: - Assigning to _minPosResult could be in a separate function like prepareMinPosResult() called from multiple places - There could be a uni

Re: Sorted ranges in combined sorted order?

2016-12-31 Thread Matthew Gamble via Digitalmars-d-learn
On Thursday, 20 October 2016 at 22:01:01 UTC, Ali Çehreli wrote: On 10/20/2016 02:15 PM, Nordlöw wrote: On Thursday, 20 October 2016 at 21:14:14 UTC, Nordlöw wrote: Given a range of ranges where individual ranges are already Ahh, my mistake. It's https://dlang.org/phobos/std_algorithm_setops

Re: Sorted ranges in combined sorted order?

2016-10-20 Thread Ali Çehreli via Digitalmars-d-learn
On 10/20/2016 02:15 PM, Nordlöw wrote: On Thursday, 20 October 2016 at 21:14:14 UTC, Nordlöw wrote: Given a range of ranges where individual ranges are already Ahh, my mistake. It's https://dlang.org/phobos/std_algorithm_setops.html#.NWayUnion you're looking for, right? Thanks! That's exac

Re: Sorted ranges in combined sorted order?

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 20 October 2016 at 21:14:14 UTC, Nordlöw wrote: Given a range of ranges where individual ranges are already Ahh, my mistake. It's https://dlang.org/phobos/std_algorithm_setops.html#.NWayUnion you're looking for, right?

Re: Sorted ranges in combined sorted order?

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 20 October 2016 at 20:49:38 UTC, Ali Çehreli wrote: Given a range of ranges where individual ranges are already sorted, is there anything in Phobos that can visit the combined range in sorted order? Although the range elements are not necessarily arrays, e.g. [ [ 3, 10, 20 ]

Sorted ranges in combined sorted order?

2016-10-20 Thread Ali Çehreli via Digitalmars-d-learn
Given a range of ranges where individual ranges are already sorted, is there anything in Phobos that can visit the combined range in sorted order? Although the range elements are not necessarily arrays, e.g. [ [ 3, 10, 20 ] [ 1, 2, 7 ] [ 5, 6 ] ] The elements should appear with