next up previous contents
Next: 4.2.1.2 Skyline Storage Up: 4.2.1 Storing sparse matrices Previous: 4.2.1 Storing sparse matrices   Contents

4.2.1.1 Compressed Row Storage (CRS)

The matrix \begin{displaymath}A_{n\times m} \;\;=\;\;
\begin{pmatrix}
10 & 0 & 0 & -2 \ 3 & 9 & 0 & 0 \ 0 & 7 & 8 & 7 \ 3 & 0 & 8 & 7
\end{pmatrix}\end{displaymath}
can be stored by using two INTEGER-vectors and one REAL/DOUBLE-vector.

\begin{tabular}{l@{\quad}c@{\quad}l@{\quad}c@{\quad}}
Values &:& $val$ &= \ [...
...){\makebox(0,0){$8$}}
\put(9.5,4.5){\makebox(0,0){$7$}}
\end{picture} \ [1ex]
The row pointer may also point at the end of the row or, in case of symmetric matrices, at the diagonal.

The Compressed Column Storage (CCS) is realized in the same way.


Gundolf Haase 2000-03-20