On 10/10/12 00:22, bearophile wrote:
Steven Schveighoffer:
Is there any advantage over having a function? I'd think you could
easily build a range based on the function, no?
Generators (that yield lexicographic permutations, permutation swaps,
combinations, etc) are quite more handy, you
On 10/9/12 7:25 PM, H. S. Teoh wrote:
I was an idiot. I knew about std.algorithm.joiner but for some reason
didn't think of it at the time. In any case, crossProduct doesn't make
any sense to me... I don't see what it's got to do with flattening
nested ranges.
I meant the resulting range spans
On Wed, Oct 10, 2012 at 09:41:34AM -0400, Andrei Alexandrescu wrote:
On 10/9/12 7:25 PM, H. S. Teoh wrote:
I was an idiot. I knew about std.algorithm.joiner but for some reason
didn't think of it at the time. In any case, crossProduct doesn't
make any sense to me... I don't see what it's got
On 10/10/12 10:27 AM, H. S. Teoh wrote:
On Wed, Oct 10, 2012 at 09:41:34AM -0400, Andrei Alexandrescu wrote:
On 10/9/12 7:25 PM, H. S. Teoh wrote:
I was an idiot. I knew about std.algorithm.joiner but for some reason
didn't think of it at the time. In any case, crossProduct doesn't
make any
On 10/10/12 10:59 AM, Andrei Alexandrescu wrote:
I'm still thinking of Cantor's method, just a different schedule of
spanning the triangle. Multiple save points are necessary.
I meant Multiple save points are NOT necessary.
Andrei
On Wed, Oct 10, 2012 at 10:59:32AM -0400, Andrei Alexandrescu wrote:
On 10/10/12 10:27 AM, H. S. Teoh wrote:
On Wed, Oct 10, 2012 at 09:41:34AM -0400, Andrei Alexandrescu wrote:
[...]
On another subject, I think this can be done with only input ranges
- no need for bidirectional.
[...]
Using
Recently I've been working on some computational geometry code, and
noticed that Phobos doesn't have any equivalent of STL's
next_permutation. I saw there were some discussions about this back in
2010 -- did anything come of it?
If there is any interest in next_permutation, I'd also like to
On 10/9/12 1:52 PM, H. S. Teoh wrote:
Recently I've been working on some computational geometry code, and
noticed that Phobos doesn't have any equivalent of STL's
next_permutation. I saw there were some discussions about this back in
2010 -- did anything come of it?
If there is any interest in
On Tuesday, October 09, 2012 14:25:13 Andrei Alexandrescu wrote:
We need that badly. Please implement pronto and let us destroy you for
having done so.
Sounds violent. :)
- Jonathan M Davis
On Tue, Oct 09, 2012 at 02:25:13PM -0400, Andrei Alexandrescu wrote:
On 10/9/12 1:52 PM, H. S. Teoh wrote:
[...]
If there is any interest in next_permutation, I'd also like to
propose a next_even_permutation for ranges without duplicate
elements. There is a simple way of extending Narayana
On 10/09/2012 10:46 PM, H. S. Teoh wrote:
On Tue, Oct 09, 2012 at 02:25:13PM -0400, Andrei Alexandrescu wrote:
On 10/9/12 1:52 PM, H. S. Teoh wrote:
[...]
If there is any interest in next_permutation, I'd also like to
propose a next_even_permutation for ranges without duplicate
elements.
Andrei Alexandrescu:
Yes, we need next_permutation. It will be up to you to convince
the Grand Inquisition Committee of Reviewers that
next_even_permutation is necessary and/or sufficient.
I don't like the design of C++ STL here. Instead of a
next_permutation(), what about ranges that yield
On 10/09/2012 11:23 PM, bearophile wrote:
Andrei Alexandrescu:
Yes, we need next_permutation. It will be up to you to convince the
Grand Inquisition Committee of Reviewers that next_even_permutation is
necessary and/or sufficient.
I don't like the design of C++ STL here. Instead of a
struct Spermutations {
The naming scheme could do with... improvement.
ixid:
The naming scheme could do with... improvement.
struct PermutationSwaps then?
Bye,
bearophile
On 10/9/12 4:46 PM, H. S. Teoh wrote:
On Tue, Oct 09, 2012 at 02:25:13PM -0400, Andrei Alexandrescu wrote:
On 10/9/12 1:52 PM, H. S. Teoh wrote:
[...]
If there is any interest in next_permutation, I'd also like to
propose a next_even_permutation for ranges without duplicate
elements. There is
On Tue, 09 Oct 2012 17:23:07 -0400, bearophile bearophileh...@lycos.com
wrote:
Andrei Alexandrescu:
Yes, we need next_permutation. It will be up to you to convince the
Grand Inquisition Committee of Reviewers that next_even_permutation is
necessary and/or sufficient.
I don't like the
Steven Schveighoffer:
Is there any advantage over having a function? I'd think you
could easily build a range based on the function, no?
Generators (that yield lexicographic permutations, permutation
swaps, combinations, etc) are quite more handy, you can compose
them with the other ranges
On Tue, Oct 09, 2012 at 11:24:27PM +0200, Timon Gehr wrote:
[...]
That's cute. =)
flatten is in std.algorithm and is called joiner.
Ahahahaha... I knew joiner existed; why didn't I think of it. :P
Also, you need to be careful with index types.
I'd suggest:
import std.algorithm,
On Tue, Oct 09, 2012 at 05:46:41PM -0400, Andrei Alexandrescu wrote:
On 10/9/12 4:46 PM, H. S. Teoh wrote:
On Tue, Oct 09, 2012 at 02:25:13PM -0400, Andrei Alexandrescu wrote:
On 10/9/12 1:52 PM, H. S. Teoh wrote:
[...]
If there is any interest in next_permutation, I'd also like to
propose a
On Tuesday, 9 October 2012 at 22:06:42 UTC, bearophile wrote:
ixid:
The naming scheme could do with... improvement.
struct PermutationSwaps then?
Bye,
bearophile
I think you're missing what I meant, naming a struct
Sperm-utations seemed a bit unpleasant, I'm not actually
bothered about
On 10/10/2012 01:13 AM, H. S. Teoh wrote:
On Tue, Oct 09, 2012 at 11:24:27PM +0200, Timon Gehr wrote:
[...]
That's cute. =)
flatten is in std.algorithm and is called joiner.
Ahahahaha... I knew joiner existed; why didn't I think of it. :P
Also, you need to be careful with index types.
I'd
22 matches
Mail list logo