This page summarizes some of the conventions used by the library.
If not otherwise specified, matrices in VLFeat are stored in memory in column major order. Given a matrix $[A_{ij}] ^{m n}$, this amounts of enumerating the elements one column per time: $A_{11}, A_{21}, , A_{m1}, A_{12}, , A_{mn}$. This convention is compatible with Fortran, MATLAB, and popular numerical libraries.
Matrices are often used in the library to pack a number data vectors $,, ^m$ of equal dimension together. These are normally stored as the columns of the matrix:
\[ X = {bmatrix} , , {bmatrix}, X {m n} \]
In this manner, consecutive elements of each data vector $$ is stored in consecutive memory locations, improving memory access locality in most algorithms.
Images $I(x,y)$ are stored instead in row-major order, i.e. one row after the other. Note that an image can be naturally identified as a matrix $I_{yx}$, where the vertical coordinate $y$ indexes the rows and the horizontal coordinate $x$ the columns. The image convention amounts to storing this matrix in row-major rather than column-major order, which is in conflict with the rule given above. The reason for this choice is that most image processing and graphical libraries assume this convention; it is, however, not the same as MATLAB's.