Permutation: Rotate...

A circular shift of all elements within the given range.

Settings

Index range
the range of elements that will be circularly permuted.
Step size
define how many positions each element will be shifted.

Examples

1. With Step size = 2 and Index range = [1,5], the permutation (1,2,3,4,5) is turned into (4,5,1,2,3).

2. With Step size = 2 and Index range = [2,5], the permutation ((1),(2,3,4,5)) is turned into ((1),(4,5,2,3))

3. With Step size = -1 and Index range = [0,0], the permutation (1,2,3,4,5) is turned into (2,3,4,5,1).

Links to this page


© djmw 20110105