On 29/08/10 2:01 AM, Andrei Alexandrescu wrote:
On 08/28/2010 07:06 PM, Manfred_Nowak wrote:
In your OP you wrote:
but Until is (correctly) not bidirectional
I recognize at least a misunderstanding in this sentence, because every
bidirectionalRange _is_ an inputRange. Therefore `Until!' _shou
On 08/28/2010 07:06 PM, Manfred_Nowak wrote:
Peter Alexander wrote:
That would be all well and good if inPlaceSplit actually existed :)
In your OP you wrote:
but Until is (correctly) not bidirectional
I recognize at least a misunderstanding in this sentence, because every
bidirectionalRang
Peter Alexander wrote:
> That would be all well and good if inPlaceSplit actually existed :)
In your OP you wrote:
> but Until is (correctly) not bidirectional
I recognize at least a misunderstanding in this sentence, because every
bidirectionalRange _is_ an inputRange. Therefore `Until!' _shou
On Sat, 28 Aug 2010 15:45:17 -0400, Peter Alexander
wrote:
On 28/08/10 12:03 PM, Manfred_Nowak wrote:
Andrei Alexandrescu wrote:
Thx, but then I am missing the whole point of this thread.
It's simple: the OP wanted this:
- start with a bidir range r
- move from the LEFT in it for a while
On 28/08/10 12:03 PM, Manfred_Nowak wrote:
Andrei Alexandrescu wrote:
Thx, but then I am missing the whole point of this thread.
It's simple: the OP wanted this:
- start with a bidir range r
- move from the LEFT in it for a while
(prefix, postfix)= inPlaceSplit( r, predicate, Move.RIGHT)
Andrei Alexandrescu wrote:
>> Thx, but then I am missing the whole point of this thread.
> It's simple: the OP wanted this:
> - start with a bidir range r
> - move from the LEFT in it for a while
(prefix, postfix)= inPlaceSplit( r, predicate, Move.RIGHT)
// == O(prefix.len)
> - then reve
On 8/27/10 16:38 PDT, Manfred_Nowak wrote:
Andrei Alexandrescu wrote:
retro is O(1) today.
Thx, but then I am missing the whole point of this thread.
It's simple: the OP wanted this:
- start with a bidir range r
- move from the LEFT in it for a while
- then reverse whatever is to the LEF
Andrei Alexandrescu wrote:
> retro is O(1) today.
Thx, but then I am missing the whole point of this thread.
-manfred
On 8/26/10 18:11 PDT, Manfred_Nowak wrote:
Andrei Alexandrescu wrote:
we should do this for Phobos too
Why is it undesirable to be able to retro in O(1)?
I've seen your other post, but couldn't connect the dots. retro is O(1)
today.
Andrei
Andrei Alexandrescu wrote:
> we should do this for Phobos too
Why is it undesirable to be able to retro in O(1)?
-manfred
On 8/25/10 6:55 PDT, Peter Alexander wrote:
Thanks for the replies Andrei, Steven.
It's a bit disappointing that there is no solution to this,
although I think you already know what I'll suggest as a
solution :) (cursors/iterators)
It's quite funny really, because I had decided to drop the whol
On 8/25/10 14:09 PDT, Simen kjaeraas wrote:
Andrei Alexandrescu wrote:
This is an annoying limitation of bidirectional ranges that we don't
have a solid solution to. Let me put on the table the unacceptable
solution as a baseline:
auto n = walkLength(r) - walkLength(until!pred(r));
popBackN(r
Andrei Alexandrescu wrote:
This is an annoying limitation of bidirectional ranges that we don't
have a solid solution to. Let me put on the table the unacceptable
solution as a baseline:
auto n = walkLength(r) - walkLength(until!pred(r));
popBackN(r, n);
reverse(r);
Of all ranges, bidirec
Andrei Alexandrescu wrote:
> Of all ranges, bidirectional ranges suffer of this limitation because
> they clearly have two underlying "ends" that are inaccessible in
> separation from the range.
Therefore one has to access them within the range. As far as I can see the
current implementation m
Thanks for the replies Andrei, Steven.
It's a bit disappointing that there is no solution to this,
although I think you already know what I'll suggest as a
solution :) (cursors/iterators)
It's quite funny really, because I had decided to drop the whole
iterator thing and just accept that the occa
On Wed, 25 Aug 2010 09:10:18 -0400, Andrei Alexandrescu
wrote:
On 8/25/10 1:08 PDT, Peter Alexander wrote:
Maybe I'm missing something, but I can't think of anyway *at all* to do
this generically.
Lets say I have some arbitrary bidirectional range, R, and I want to
find the first element th
On 8/25/10 1:08 PDT, Peter Alexander wrote:
Maybe I'm missing something, but I can't think of anyway *at all* to do
this generically.
Lets say I have some arbitrary bidirectional range, R, and I want to
find the first element that satisfies some predicate. After that, I want
to reverse the part
On Wed, 25 Aug 2010 04:08:00 -0400, Peter Alexander
wrote:
Maybe I'm missing something, but I can't think of anyway *at all* to do
this generically.
Lets say I have some arbitrary bidirectional range, R, and I want to
find the first element that satisfies some predicate. After that, I wa
Sorry, I should have mentioned this, but creating a copy of the
range into a newly allocated array is absolutely not acceptable
(this operation should require zero memory overhead).
For reference, this is trivially achievable in C++:
std::reverse(R.begin(), std::find_if(R.begin(), R.end(), pred))
Peter Alexander wrote:
Maybe I'm missing something, but I can't think of anyway *at all* to do
this generically.
Lets say I have some arbitrary bidirectional range, R, and I want to
find the first element that satisfies some predicate. After that, I want
to reverse the part of the range
Maybe I'm missing something, but I can't think of anyway *at all* to do
this generically.
Lets say I have some arbitrary bidirectional range, R, and I want to
find the first element that satisfies some predicate. After that, I want
to reverse the part of the range up to that element.
Essenti
21 matches
Mail list logo