Shift origin of arrays and vectors
Shift origin of arrays and vectors.
Vector to be shifted
Number of places elements to be shifted, with default value of 1 meaning to put the last element first, followed by the first element, then the second, etc
Array to be shifted
Vector of numbers to be shifted in each dimension, with
default value corresponding to
shift(x,n) returns P^n(x) where P is the
ashift is the array generalization of this: the
n-th dimension is shifted by
v[n]. In other
It is named by analogy with
This function is here because a shifted semimagic square or hypercube is semimagic and a shifted pandiagonal square or hypercube is pandiagonal (note that a shifted magic square is not necessarily magic, and a shifted perfect hypercube is not necessarily perfect).
Robin K. S. Hankin
1 2 3 4 5
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.