powered by
Reverses the first k elements of the state vector (turnstile operation). Tracks celestial coordinates (LRX momentum).
List with components:
Integer vector with first k elements reversed
List of updated celestial coordinates (nL, nR, nX, theta, phi, omega_conformal)
Integer vector representing the current permutation state
Integer, number of elements to reverse from the beginning
Optional list of current celestial coordinates. If NULL, starts from zero coordinates.
result <- reverse_prefix(1:10, k = 4) result$state
Run the code above in your browser using DataLab