Learn R Programming

cayleyR (version 0.2.1)

shift_left: Shift State Left (with Coordinates)

Description

Performs a cyclic left shift on the state vector, moving the first element to the end. Tracks celestial coordinates (LRX momentum).

Value

List with components:

state

Integer vector with elements shifted left by one position

coords

List of updated celestial coordinates (nL, nR, nX, theta, phi, omega_conformal)

Arguments

state

Integer vector representing the current permutation state

coords

Optional list of current celestial coordinates. If NULL, starts from zero coordinates.

Examples

Run this code
result <- shift_left(1:5)
result$state
result$coords

# Chain operations using coords
r1 <- shift_left(1:5)
r2 <- shift_left(r1$state, r1$coords)
r2$coords$nL

Run the code above in your browser using DataLab