-
Notifications
You must be signed in to change notification settings - Fork 191
Stdlib Sparse matrix API
To be compact instead of being exhaustive. It aims at supplying Fortran users with a minimum (yet useful) number of routines and data structures related to sparse matrices storage and operations. This library is particularly targeted at a non-expert in numerical computation public. Thus we aim at having a simple and easy to use API.
This section is based on Saad (1994). In that work, a much more complete and extensive list of formats is described. Here we take only the ones that we think are most useful at the moment.
Given an m by n real or complex matrix A containing nnz nonzero elements with each element denoted by a_ij this format represents A using a set of three arrays: values, rows, and columns, as described below.
values A real/complex array of size nnz containing the matrix elements a_ij in any order.
rows An integer array of size nnz containing the row indices of the elements a_ij.
columns An integer array of size nnz containing the column indices of the elements a_ij.
Given an m by n real or complex matrix A containing nnz nonzero elements with each element denoted by a_ij this format represents A using a set of three arrays: values, ja, and ia, as described below.
values A real/complex array of size nnz containing the matrix elements a_ij stored row by row from row 1 to row n.
ja An integer array of size nnz containing the column indices of the elements a_ij as stored in the array values.
ia An integer array of size n+1 containing the index in the arrays values and ja where each row starts. The value at ia(n+1) always has the value ia(1)+nnz.
This format is similar to the CSR format described previously. The difference is that instead of storing row values we store column values in the array values. The exact description of this format is given below.
Given an m by n real or complex matrix A containing nnz nonzero elements with each element denoted by a_ij this format represents A using a set of three arrays: values, ja, and ia, as described below.
values A real/complex array of size nnz containing the matrix elements a_ij stored column by column from column 1 to column m.
ia An integer array of size nnz containing the row indices of the elements a_ij as stored in the array values.
ja An integer array of size m+1 containing the index in the arrays values and ia where each column starts. The value at ja(m+1) always has the value ja(1)+nnz.
Saad, Y., SPARSKIT: A basic tool kit for sparse matrix computation, 1994.https://www-users.cs.umn.edu/~saad/software/SPARSKIT/