Learn R Programming

cayleyR (version 0.1.0)

shift_right: Shift State Right

Description

Performs a cyclic right shift on the state vector, moving the last element to the beginning.

Usage

shift_right(state)

Value

Integer vector with elements shifted right by one position

Arguments

state

Integer vector representing the current permutation state

Examples

Run this code
# Simple example
shift_right(1:5)

# With variable assignment
start_state <- 1:20
result <- shift_right(start_state)
print(result)

Run the code above in your browser using DataLab