Is there any package to perform Sparse Linear Algebra computations, maybe based on fast and efficient C libraries? I searched on Hackage but I didn't find anything at regard: hmatrix, which uses GSL, BLAS and LAPACK, is great, but doesn't seem to include special algorithms to solve linear systems and eigen-values/vectors problems with sparse matrices. What I'd like to find, it is something similar to the sparse.linalg module in scipy. Thanks!
As far as I know, there is no such package yet.
There was an article R. L. Winwright and M. E. Sexton. A study of sparse matrix representations for solving linear systems in a functional language. J. Functional Programming, 2(1):61-72, Jan. 1992., where they compared Quad-tree, Binary tree and run-length encoding sparse matrix representations in Miranda. Quad-trees were superiour on the CG method, and run-length encoding did well with SOR.
There was an implementation of the FEM in Haskell in 1993, Some issues in a functional implementation of a finite element algorithm. They used quad-trees too. The performance achieved was not stellar, but it was long long time ago... I expect that today Haskell can perform better. There also new array libraries to use, which may give better representations of the sparse matrices. Today we have IntMap
, Vector
and even Repa
.
A library of the sparse solvers in Haskell (or bindings to C/Fortran solvers) is still to be written.