[Haskell-cafe] Purely funcional LU decomposition

2009-02-03 Thread Rafael Gustavo da Cunha Pereira Pinto
Hello folks 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... At first I thought it would be necessary to use a mutable or monadic version of Array, but then I figured out it

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-03 Thread Paulo Tanimoto
Hi Rafael, 2009/2/3 Rafael Gustavo da Cunha Pereira Pinto : > > Hello folks > > > 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... > > At first I thought it would be neces

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-03 Thread Thomas Davie
On 3 Feb 2009, at 22:37, Rafael Gustavo da Cunha Pereira Pinto wrote: Hello folks 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... At first I thought it would be n

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-04 Thread Rafael Gustavo da Cunha Pereira Pinto
On Wed, Feb 4, 2009 at 04:42, Thomas Davie wrote: > > Shinyness indeed – a quick note though, as ghc doesn't support dynamic > linking of Haskell code, the above is equivalent to the GPL. > I always use LGPL. Anyway, I will keep it that way, as I still have hopes on dynamic linking Haskell beco

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-04 Thread Rafael Gustavo da Cunha Pereira Pinto
Matt's code is pretty comprehensive. His LU implementation is much cleaner, essentially because he used the "ijk" format, while I used the "kij". I'll take a look and e-mail him eventually. Thanks! On Tue, Feb 3, 2009 at 23:26, Paulo Tanimoto wrote: > Hi Rafael, > > 2009/2/3 Rafael Gustavo

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-04 Thread Dan Piponi
2009/2/3 Rafael Gustavo da Cunha Pereira Pinto : > 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

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-04 Thread Rafael Gustavo da Cunha Pereira Pinto
On Wed, Feb 4, 2009 at 17:09, Dan Piponi wrote: > 2009/2/3 Rafael Gustavo da Cunha Pereira Pinto >: > > 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 >

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-04 Thread Dan Piponi
On Wed, Feb 4, 2009 at 12:57 PM, Rafael Gustavo da Cunha Pereira Pinto wrote: > Those different representations are derived from my (very) low Haskell > handicap! :-D BTW That wasn't intended in any way as a criticism. I think it's interesting to look at real matrix code that people have written

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-04 Thread Rafael Gustavo da Cunha Pereira Pinto
On Wed, Feb 4, 2009 at 19:14, Dan Piponi wrote: > On Wed, Feb 4, 2009 at 12:57 PM, Rafael Gustavo da Cunha Pereira Pinto > wrote: > > > Those different representations are derived from my (very) low Haskell > > handicap! :-D > > BTW That wasn't intended in any way as a criticism. I think it's

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-05 Thread Henning Thielemann
--- Begin Message --- Rafael Gustavo da Cunha Pereira Pinto wrote: interesting to look at real matrix code that people have written and think about what would be needed in a library to make it easier to write. -- Dan What I miss most is a data structure with O(1) (amortize

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-05 Thread Henning Thielemann
--- Begin Message --- Paulo Tanimoto wrote: Pretty cool, thanks for releasing this into the wild. I remember looking into this about a year ago. By the way, have you seen Matt's DSP library? http://haskelldsp.sourceforge.net/ He's got LU and others in there, if my memory serves me. The las

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-05 Thread Rafael Gustavo da Cunha Pereira Pinto
2009/2/5 Henning Thielemann > > > -- Forwarded message -- > From: Henning Thielemann > To: Rafael Gustavo da Cunha Pereira Pinto > Date: Thu, 05 Feb 2009 14:43:13 +0100 > Subject: Re: [Haskell-cafe] Purely funcional LU decomposition > Rafael Gustavo da C

Re: [Haskell-cafe] Purely funcional LU decomposition

2009-02-05 Thread wren ng thornton
Rafael Gustavo da Cunha Pereira Pinto wrote: What I miss most is a data structure with O(1) (amortized) direct access. Finger trees get close, O(log(min(i,n-i))): http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-Sequence.html (And Theta(1) amortized for all dequeue