choreo.ActionSym.InvolutivePermutations#

static ActionSym.InvolutivePermutations(Py_ssize_t n)#

Generates all involutive permutations of size n.

The generated rational time shifts are given in reduced form and increasing order.

Example

>>> for p in choreo.ActionSym.InvolutivePermutations(4):
...     print(p)
...
[0 1 2 3]
[0 1 3 2]
[0 2 1 3]
[0 3 2 1]
[1 0 2 3]
[1 0 3 2]
[2 1 0 3]
[2 3 0 1]
[3 1 2 0]
[3 2 1 0]
Parameters:

n (int) – Permutation size

Return type:

numpy.ndarray(shape = n, dtype = np.intp)