Skip to content

AlexanderKoshkarov/sparse-linear-algebra

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sparse-linear-algebra

Sparse linear algebra datastructures and algorithms in Haskell

TravisCI : Build Status

This library provides common numerical analysis functionality, without requiring any external bindings. It is not optimized for performance (yet), but it serves as an experimental platform for scientific computation in a purely functional setting.

Algorithms :

  • Iterative linear solvers

    • Conjugate Gradient Squared (CGS)

    • BiConjugate Gradient Stabilized (BiCGSTAB) (non-Hermitian systems)

  • Matrix decompositions

    • QR factorization
  • Utilities : Vector and matrix norms, matrix condition number, Givens rotation, Householder reflection

  • Predicates : Matrix orthogonality test (A^T A ~= I)


This is also an experiment in principled scientific programming :

  • set the stage by declaring typeclasses and some useful generic operations (normed linear vector spaces, i.e. finite-dimensional spaces equipped with an inner product that induces a distance function),

  • define appropriate data structures, and how they relate to those properties (sparse vectors and matrices, defined internally via Data.IntMap, are made instances of the VectorSpace and AdditiveGroup classes respectively). This allows to decouple the algorithms from the actual implementation of the backend,

  • implement the algorithms, following 1:1 the textbook [1]

License

GPL3, see LICENSE

Credits

Inspired by

References

[1] : Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd ed., 2000

About

Sparse linear algebra datastructures and algorithms in Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 100.0%