You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-39626: Fixed issue the caused random element in for Tuples to stall by adding unrank method.
Fixes#39534. There was an issue in Tuples causing random element to
stall. It was stalling because Tuples did not have an efficient method
of getting the i-th element without iterating through the entire set. To
fix this an unrank method was added to Tuples. This method was based on
the unrank method found in
src\sage\categories\finite_enumerated_sets.py. This unrank method
creates each tuple in a similar way to how numbers in some base are
created. Also added documentation, an example, and various tests to make
sure the function is working correctly.
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [X] The title is concise and informative.
- [X] The description explains in detail what this PR is about.
- [X] I have linked a relevant issue or discussion.
- [X] I have created tests covering the changes.
- [X] I have updated the documentation and checked the documentation
preview.
### ⌛ Dependencies
URL: #39626
Reported by: Noel-Roemmele
Reviewer(s): Travis Scrimshaw
0 commit comments