Timeline for Generating Tuples with restrictions
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 1, 2016 at 12:57 | comment | added | Kiro |
I modified your answer using IntegerPartitions by enforcing sum of squares first and then selecting those that satisfy the sum of elements. Together with packed array coercion to speed up the otherwise expensive Sqrt , I found that this can be the fastest way at least for the parameters I have been using. Apparently, IntegerPartitions can be faster when in the input the list of elements are spread a bit wider and not bunched together.
|
|
Jan 29, 2016 at 15:12 | history | edited | Kuba | CC BY-SA 3.0 |
deleted 2 characters in body
|
Jan 29, 2016 at 14:36 | history | edited | Kuba | CC BY-SA 3.0 |
added 77 characters in body
|
Jan 29, 2016 at 12:47 | history | edited | Kuba | CC BY-SA 3.0 |
deleted 123 characters in body
|
Jan 29, 2016 at 11:43 | history | edited | Kuba | CC BY-SA 3.0 |
added 635 characters in body
|
Jan 29, 2016 at 10:05 | vote | accept | Kiro | ||
Jan 29, 2016 at 10:02 | history | answered | Kuba | CC BY-SA 3.0 |