BOB Summer 2019 - Henning Thielemann, Expressive Linear Algebra in Haskell
Channel: BOB
Date: 2019-09-02

Henning Thielemann,
Expressive Linear Algebra in Haskell

A NEW TYPE-SAFE HASKELL INTERFACE TO BLAS AND LAPACK
Although Haskell is strictly built on mathematical principles, much more than more popular languages, Haskell is still not in common use by mathematicians and engineers. Numeric computations are dominated by MatLab/Octave, R, Excel/LibreOffice Calc, and in recent times NumPy. Haskell has the hmatrix suite of packages. However, these solutions are more or less tailored to the use in an interactive environment, because they are weakly or dynamically typed and use short unqualified function names.

We present a package for projects where type-safety and efficiency counts. The package supports almost all types of matrices that LAPACK supports, e.g. triangular matrices, Hermitian matrices, banded matrices und employs the specialised algorithms that LAPACK implements for them. It expresses important relations in types, e.g. “the product of two triangular matrices is triangular” or “the eigenvalues of Hermitian matrices are real”. We also give more structure to vectors and matrices. E.g. we can have Haskell enumerations as indices, we can have Sets of elements as matrix dimension, we can track how matrices were built from smaller blocks. We can also use matrices as vectors without losing structure. This is more useful than you might think first.

https://bobkonf.de/2019-summer/thielemann.html