[Haskell-cafe] Is anyone working on a sparse matrix library in Haskell?
mukesh tiwari
mukeshtiwari.iiitm at gmail.com
Sat Dec 1 13:23:50 CET 2012
Hi Mark
To continue with library I just wrote a quick recursive matrix
multiplication. Since you mentioned about Strassen's algorithm so I went to
wikipedia ( http://en.wikipedia.org/wiki/Strassen_algorithm ) and wrote the
recursive algorithm using 4 multiplication but it's not very hard to modify
this to Strassen's algorithm. You can see code (
https://github.com/mukeshtiwari/Puzzles/blob/master/recursivematrixmultiplication/Matmultiplication.hs).
It's just quick code and it has lot of chance for improvement like
using
Data Parallel Haskell ) , some parallelism using Simon's monad-par library
or distributed parallelism using Cloud Haskell and sparse matrix
representation consideration.
Mukesh Tiwari
On Sat, Dec 1, 2012 at 3:28 AM, Mark Flamer <mark at flamerassoc.com> wrote:
> Thanks for all the replies,
> It sounds like there is enough interest and even some potential
> collaborators out there. I have created a few data structures to represent
> sparse vectors and matrices. The vector was a simple binary tree and the
> matrix a quad tree. As I suspected a standard IntMap was around 3X as fast
> as my binary tree, so I have switched to the IntMap for now. I was hoping
> to
> hold on to my quad tree for the matrix rep. because I like the elegance of
> the recursive algorithms like Strassen’s for multiplication. In the end it
> will most likely be best to have a few different matrix representations
> anyway. For instance, I know that compressed row form is most efficient for
> certain algorithms. I have a Gauss iterative solver working currently and
> am
> thinking of moving on to a parallel Conjugate gradient or direct solver
> using LU decomposition. I’m no expert in Haskell or numeric methods but I
> do
> my best. I’ll clean up what I have and open up the project on Github or
> Bitbucket. Any other thoughts or ideas are welcome.
> I’m currently using the Matrix Market files for testing. It would be nice
> to
> benchmark this against an industry standard solver in C or Fortran, without
> having to do a lot of work to set it up. Does anyone know of an easy way to
> do this? I’m just trying to get results to compare in orders of magnitude
> for now. It would be motivating to see these comparisons.
>
>
>
>
> --
> View this message in context:
> http://haskell.1045720.n5.nabble.com/Is-anyone-working-on-a-sparse-matrix-library-in-Haskell-tp5721452p5721556.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121201/9d1e8399/attachment.htm>
More information about the Haskell-Cafe
mailing list