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

Chapter 13 Sparse Linear Equations 879
What you need to know to use these subprograms
If the entries are required to be ordered by row and column, less storage is
needed. In addition, symmetry in the matrix can be used by storing only the
entries, for example, on or below the main diagonal. Other contexts, such as
finite element analysis, can make even more concise representations of the
locations of the nonzeros.
This package adopts a particular internal format that allows arbitrary matrices
to be stored in 2nz+n+1 storage locations, where nz represents the number of
nonzeros in the matrix. In essence, the jcol array, which has repeated entries, is
replaced by a shorter array that gives the index of the first element of each
column in the mxvalu array and an indication of the number of elements in
each column. These two pieces of information per matrix column can be
represented in a single array colstr of length n+1 if the convention is adopted
that the number of nonzeros in column j is given by colstr(j+1)colstr(j) and if
colstr(n+1) is set accordingly. When a matrix is symmetric, only its lower
triangle is stored.
Both the full storage and lower triangular storage formats are known as the
column pointer, row index representation. Table 13-2 illustrates the full storage
format, and Table 13-3 shows the lower triangular representation.