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
i think the problem is that Tuples uses the generic implementation of __getitem__ that is defined for all enumerated sets: to find T[n], it goes through the tuples one at a time until the nth one is reached. (Technically, unrank is called directly, instead of __getitem__, because __getitem__ is basically a wrapper around unrank.) This should be easy to fix by providing Tuples with a custom unrank method that constructs T[n] directly.
Steps To Reproduce
The following code does not produce a result:
Expected Behavior
Generating a random tuple should be instantaneous. For the example given above it can be done along these lines:
Actual Behavior
Call to
.random_element()
stalls.Additional Information
No response
Environment
Checklist
The text was updated successfully, but these errors were encountered: