choreo.ActionSym.TimeShifts#
- static ActionSym.TimeShifts(Py_ssize_t max_den)#
Generates all rational fractions in \([0,1[\) with denominator lower or equal to
max_den
.The generated rational time shifts are given in reduced form and increasing order.
Example
>>> for a,b in choreo.ActionSym.TimeShifts(5): ... print(a,b) ... 0 1 1 5 1 4 1 3 2 5 1 2 3 5 2 3 3 4 4 5
- Parameters:
max_den (
int
) – Maximum fraction denominator.- Returns:
The fraction numerator and denominator.
- Return type:
See also