First page Back Continue Last page Overview Graphics
Matrix Data Representation
Recall, C stores data in row-major form:
- a11, a12, ..., a1n; a21, a22, ..., a2n; ...; am1, am2, ..., amn
If using "pointer to array of pointers to rows" scheme in C, can reference entire rows by first index, e.g. 3rd row = a[2].
- Recall in C array indices start at zero!!
FORTRAN stores data in column-major form:
- a11, a21, ..., am1; a12, a22, ..., am2; ...; a1n, a2n, ..., amn
Notes: