[Haskell-cafe] matrix computations based on the GSL

Henning Thielemann lemming at henning-thielemann.de
Fri Jul 8 07:24:10 EDT 2005


On Thu, 7 Jul 2005, Alberto Ruiz wrote:

> Hello! Thank you very much for all your suggestions. A new version of the
> library can be found at:
>
> http://dis.um.es/~alberto/hmatrix/matrix.html

If the Matrix type would be parametrised then Matrix.fromBlocks could use
a more natural indexing.

Matrix.fromBlocks :: [[Matrix a b]] -> Matrix (Int,a) (Int,b)

The Int of the index pair would store the block number and the type a
index would store the index within the block. Hm, but it would not be
possible to store the sizes of the sub-matrices.  It would be possible
only if the sub-matrices have the same size.  Maybe it is better to allow
matrices of matrices and to be able to apply a matrix-matrix
multiplication which in turn employs a matrix-matrix multiplication of its
elements. But the matrix decompositions will fail on this structure - but
possibly those which fail aren't appropriate for block matrices.



More information about the Haskell-Cafe mailing list