- 1234512345 shouldn't exist. 12345 is fine.
- 123123123 should just be 123
- 121212 should be 12
- 333 should be 3
Then I asked Colin to help me figure out why it takes so long to calculate longer sequences. I initially thought that it had something to do with my
correct_timing method, but we soon discovered that it was actually Ruby's repeated_permutation function that was taking so much time to run. We talked about the potential of making a lazy method to return a smaller number of values, but I'm not sure if it's possible in this scenario. If I decide to turn this into a web app, I might need to pre-generate the values and then have the app run checks against an already-established list of possible throw sequences for different throw heights, number of juggling props, and number of throws in a sequence.In the meantime, I implemented inclusion and exclusion functionality so that users have greater control over what types of values are returned.
And yes, I'm still pushing changes to GitHub.
No comments:
Post a Comment