Skip to main content
. 2025 Mar 26;20(3):e0320046. doi: 10.1371/journal.pone.0320046
Algorithm 13 INV_SHIFT_TILES(stiles, R, C, x, r)
Input : stiles - a list containing the shifted tiles
R - the number of rows in the grid of tiles
C - the number of columns in the grid of tiles
x - initial value for the shuffling pattern
r - constant value for shuffling
Output : temp - a list containing the inverted shifted tiles

Initialize temp ← None with length R * C
index ← GenerateImageShufflingPattern(x, r, R, C)
For i from 0 to R * C - 1 do
temp[index[i]] ← stiles[i]
Return tem