[Haskell] Announce: comfort-array, lapack
Henning Thielemann
lemming at henning-thielemann.de
Sat May 25 14:42:51 UTC 2019
I like two announce two of my packages:
1. comfort-array
http://hackage.haskell.org/package/comfort-array
It provides Boxed and Storable arrays with very liberal shape definitions.
You may use ranges of indices like in 'array' or zero-based indexing like
in 'repa', but you can also use arbitrary index Sets, enumerations,
concatenation of arrays and more. E.g. an array with (Shape.Enumeration
Ordering) has three elements with indices LT, EQ, GT.
2. lapack
http://hackage.haskell.org/package/lapack
A high-level interface to the numerical Linear Algebra package LAPACK. It
is based on comfort-array, which means that a vector can have a rich
structure. E.g. matrix vector multiplication has the signature:
(#*|) :: Matrix.General height width a -> Vector width a -> Vector height a
Thus, a 'Matrix.General (Shape.Enumeration Ordering) (h,w) a' would map a
rectangular array with dimensions h and w to a three-element vector with
indices LT, EQ, GT.
The LAPACK interface provides solvers for simultaneous linear equations,
linear least-squares problems, eigenvalue and singular value problems for
square, triangular, symmetric, Hermitian, banded and banded Hermitian
matrices, as LAPACK supports them.
For a motivating example refer to:
http://code.henning-thielemann.de/bob2019/main.pdf
More information about the Haskell
mailing list