eng

### row-major form <mathematics, computer science>

storage mechanism for multidimensional array in linear memory, organized such that each row is stored in consecutive locations and such that the complete rows are the stored one after the other and continuing on is a similar fashion of each additional index

Note 1 to entry: If the indexes are `(i, j)` with the number of rows `r` and columns `c`, then the mapping between the multidimensional locations to the linear storage locations is given by: \[[i,j \in \mathbb{Z} \backepsilon 1 \leq i \leq r; 1 \leq j \leq c] \implies [(i,j) \rightarrow (i-1)c + j]\] \[[i,j,k \in \mathbb{Z} \backepsilon 1 \leq i \leq r; 1 \leq j \leq c; 1 \leq k \leq f] \implies [(i,j,k) \rightarrow ((i-1)c + j -1)f + k]\]

Note 2 to entry: The matrix `[[1,2,3],[4,5,6],[7,8,9]]` in row major form is stored as `[1, 2, 3, 4, 5, 6, 7, 8, 9]`. For higher dimensions, the same pattern is applied recursively:

ORIGIN: ISO/TC 211 Glossary of Terms - English (last updated: 2020-06-02)