Learn R Programming

cayleyR (version 0.1.0)

shift_left: Shift State Left

Description

Performs a cyclic left shift on the state vector, moving the first element to the end.

Usage

shift_left(state)

Value

Integer vector with elements shifted left by one position

Arguments

state

Integer vector representing the current permutation state

Examples

Run this code
# Basic shift operation
shift_left(1:5)

# With variables
start_state <- 1:20
result <- shift_left(start_state)
print(result)

Run the code above in your browser using DataLab