Timeline for Efficient way to turn a subset into a permutation
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 23, 2012 at 18:09 | comment | added | Leonid Shifrin | @Sasha Glad I could help, thanks for the accept. Actually, I think a more reusable component for this would be a function which takes a length and a list of positions, and constructs the complementary list of positions. Can be done along the same lines but simpler. | |
Feb 23, 2012 at 17:30 | vote | accept | Sasha | ||
Feb 23, 2012 at 17:21 | comment | added | Sasha | I tried a version of this too, but for some reason it was hopelessly slow. Thanks for the solution! | |
Feb 23, 2012 at 17:14 | comment | added | Leonid Shifrin |
Actually, you can get about 30% speed increase by setting RuntimeOptions->"Speed" , in which case, for the size of the lists as in benchmarks above, the compiled solution is order of magnitude faster than your version.
|
|
Feb 23, 2012 at 17:04 | history | edited | Leonid Shifrin | CC BY-SA 3.0 |
Added benchmarks
|
Feb 23, 2012 at 16:53 | history | answered | Leonid Shifrin | CC BY-SA 3.0 |