[Haskell-cafe] Purely funcional LU decomposition

Dan Piponi dpiponi at gmail.com
Wed Feb 4 14:09:46 EST 2009

2009/2/3 Rafael Gustavo da Cunha Pereira Pinto <RafaelGCPP.Linux at gmail.com>:
>          After a discussion on whether is possible to compile hmatrix in
> Windows, I decided to go crazy and do a LU decomposition entirely in
> Haskell...
> import Data.Array.IArray
>               e_an i j=a!(i,j)-(lik i)*a!(k,j)

There are three different representations of arrays in this code:
arrays, lists and a functional one where f represents an array with
elements (f i j). Looks like a candidate for a stream fusion type
thing so the user only writes code using one representation and some
RULES switch back and forth between representations behind the scenes.

More information about the Haskell-Cafe mailing list