# The convention used here for storing matrices is the same commonly # used for scientific programming in C, namely linearizing in Fortran order. # Let A be an m by n matrix. We represent this by # a: array of real; # m, n, lda: int; # where the variable lda ("leading dimension of a") is used so that a # succession of matrix problems of varying sizes can be created without # wholesale copying of data. The element of A in the i-th row and j-th column # is stored in a[i+lda*j], where 0<=i