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

426 HP MLIB User’s Guide
What you need to know to use these subprograms
val( ), a single array pntr( ) of length k+1 can be used instead of pntrb( ) and
pntre( ) by having pntrb(i) = pntr(i) and pntr(i) = pntr(i+1).
The matrix in Table 4-4 could be represented in CSC format as:
Table 4-5 CSC Format Matrix
Optionally, a single array pntrb( ) (instead of pntrb( ) and pntre( )) could be
used:
pntr= 15689 12
MSC - Modified sparse column. The MSC format is a variation of the CSC
format obtained by storing the main diagonal of the matrix in a specific array.
Given a sparse m-by-k matrix A with nnz nonzero entries, the MSC
representation requires five arrays:
diag(*) - Scalar array of length d containing the main diagonal of A, where
d=min( m, k) is the number of elements in the main diagonal.
val(*) - Scalar array of length max(nnz-d, pntre(k)-1) containing the nonzero
matrix entries that do not belong to the main diagonal.
indx(*) - Integer array of length max(nnz, pntre(k)-1) containing row indices
such that indx(i) corresponds to the row index of val(i).
pntrb(*) - Integer array of length k such that pntrb(j) points to location in
val( ) of the first nonzero element in column j.
pntre(*) - Integer array of length k such that pntre(j)-1 points to location in
val( ) of the last nonzero element in column j.
The matrix in Table 4-4 could be represented in MSC format as:
Table 4-6 MSC Format Matrix
val= 11 21 31 41 22 13 33 44 15 35 45
indx= 12342134134
pntrb= 15689
pntre= 568912
diag= 11 22 33 44
val= 21 31 41 13 15 35 45
indx= 2341134
pntrb= 14455
pntre= 44558