I have posted a new extension to the GSL webpage for sparse matrix routines. I've added a new structure 'gsl_spmatrix' along with an API similar to the gsl_matrix API for:
- setting/getting elements of a sparse matrix - adding two sparse matrices - dgemv and dgemm BLAS routines for sparse matrices - transposing - converting to/from a dense gsl_matrix object I've tried to make the API as simple as possible and I think its pretty easy to work with. There is no linear solver for A x = b included here. This is a very complex problem and there already exist many software libraries which efficiently solve this problem. Many of these libraries however don't have nice interfaces to construct a sparse matrix in compressed storage formats. This extension essentially makes it very easy to define a sparse matrix, add elements to it, do basic operations like add/transpose/matrix-vector/matrix-matrix, and then access the compressed storage arrays so they can easily be passed to sophisticated external linear solver libraries. Many of the routines are based on the LGPL CSparse library, and converted to GSL-like APIs. Feel free to try it out - I've been using these routines with good success in interfacing with linear solver libraries like Pastix and MUMPS which require the compressed storage arrays as input. The extension can be accessed on github at: https://github.com/pa345/gslsp Patrick
