[NumericPrelude] Working on Numeric Prelude (Linear Algebra?)

Henning Thielemann schlepptop at henning-thielemann.de
Thu Aug 15 06:31:12 BST 2013


Hi Ben,

Am 15.08.2013 02:41, schrieb Ben Sherman:

> Basically, I have been trying to use Haskell in my "real world" job
> (which I just started; I've recently graduated), which involves mainly
> statistically work and linear algebra sort-of-stuff (think Matlab...
> Matlab would be 100% the right tool for the job if I weren't so obsessed
> with Haskell and its lambda-calculus sort of approach). Anyway, I
> noticed that the /hmatrix/ package has a class called Field where many
> of the linear algebra algorithms are implemented. Unfortunately, I think
> the only instance of Field is Double (and the only datatype for which
> these algorithms are implemented). I was hoping for a general set of
> algorithms for all fields (particularly, I like to use rational numbers
> if I can because it's 2013 and computers are darned powerful!).

Computing with Rationals in Linear Algebra can easily blow away any 
current and future silicon based computer, because the denominators grow 
in every step. Nonetheless, there are other interesting number types for 
Linear Algebra like floating point numbers with extended precision and 
computable reals, polynomials (as used in polyphase matrices for filter 
banks) or even matrices (for block matrices).


> And this made me think it would be fun to totally reimplement Haskell's
> numeric system. And I started think about having numeric operators
> working like they do in Matlab (because we SHOULD be able to use (+) on
> vectors without having to let (*) typecheck!).

Yes, that's the intention of Numeric Prelude.


> Anyway, I think it's a must to have some linear algebra algorithms
> (determinant, inverse, matrix decompositions, finding bases, etc.) ! And
> I see that's on your to-do list. I'd be happy to work on implementing
> them (in pure Haskell... so not for performance, really) in my free time!

I got another similar offer at the beginning of the year from Joseph 
Victor. I cc my answer to him and also to the Numeric Prelude mailing list.

I am glad to fill the Linear Algebra gaps in the library. The current 
version of NumericPrelude is at:
    http://code.haskell.org/numeric-prelude/

Note, that we recently switched to a BSD license.


Best,
Henning




More information about the Numeric-Prelude mailing list