HP MLIB User's Guide Vol. 1 7th Ed.

Chapter 4 Sparse BLAS Operations 429
What you need to know to use these subprograms
Consider, for example, the 5 x 4 matrix:
Table 4-9 5 x 4 Matrix
This matrix could be represented in DIA format (using ndiag = 6) as:
Table 4-10 DIA Format Matrix
ELL- Ellpack-Itpack. Given a sparse m-by-k matrix A with maxnz nonzero
elements in any row, the ELL format stores the nonzero entries of A row by row.
Two arrays are required for the ELL representation:
val( lda,*) - Two dimensional lda-by-maxnz scalar array where lda is
greater or equal to m. The first entries in row val( i, :) consist of nonzero
elements in row i of A.
indx( lda, *) - Two dimensional lda-by-maxnz integer array where row
indx( i, :) stores column indices for row i of A: indx( i, j) corresponds to the
column index of val( i, j). If a row has t nonzero elements with t less than
maxnz, then indx( i, t+1) is set to a negative value.
11 12 0 14
21 22 0 0
0 0 33 34
00044
51 52 0 54
idiag= -4 -3 -1 0 1 3
val= - - 21 11 12 14
--0220-
-0033340
51 52 54 44 - -