Re: [math] patch submitted for commons-math sparse matrix support

2008-12-10 Thread Luc Maisonobe
Bill Barker a écrit : > I've recently come up with a need in my day-job for a > SparseMatrix/SparseVector implementation, so would would like to offer to > help on this project. I should still have karma for commons (my Apache id > is [EMAIL PROTECTED] for those that haven't been around since m

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-09 Thread Bill Barker
I've recently come up with a need in my day-job for a SparseMatrix/SparseVector implementation, so would would like to offer to help on this project. I should still have karma for commons (my Apache id is [EMAIL PROTECTED] for those that haven't been around since my last commons commit. I'm pr

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-03 Thread Sujit Pal
Ok, thanks very much. -sujit On Wed, 2008-12-03 at 22:53 +0100, Luc Maisonobe wrote: > Sujit Pal a écrit : > > Thanks, added it to JIRA: > > https://issues.apache.org/jira/browse/MATH-231 > > > > Also, please let me know if you want me to go ahead and submit a patch > > for this. > > No, this i

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-03 Thread Luc Maisonobe
Sujit Pal a écrit : > Thanks, added it to JIRA: > https://issues.apache.org/jira/browse/MATH-231 > > Also, please let me know if you want me to go ahead and submit a patch > for this. No, this is not needed, thanks. > > I also noticed that MATH-230 is open/unassigned. The patch is already > in,

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-03 Thread Sujit Pal
Thanks, added it to JIRA: https://issues.apache.org/jira/browse/MATH-231 Also, please let me know if you want me to go ahead and submit a patch for this. I also noticed that MATH-230 is open/unassigned. The patch is already in, so all that remains is to review it before deciding to check in or no

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-02 Thread Luc Maisonobe
Sujit Pal a écrit : > I've updated MATH-230 with a fresh patch (this time against trunk, since > MATH_2_0 has been moved to trunk) putting back the fallback code Luc > pointed out was used for performance. Thanks. > > Details are in the bug: > http://issues.apache.org/jira/browse/MATH-230 > > T

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-02 Thread Sujit Pal
I've updated MATH-230 with a fresh patch (this time against trunk, since MATH_2_0 has been moved to trunk) putting back the fallback code Luc pointed out was used for performance. Details are in the bug: http://issues.apache.org/jira/browse/MATH-230 There are also some test times for running with

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-02 Thread luc . maisonobe
- "Ted Dunning" <[EMAIL PROTECTED]> a écrit : > Is performance in LUD normally achieved by fast element access? Or is > it > done by using higher order operators on a view of a row (or column)? This is not used for LUD but only for simpler operations (multiplication, addition, subtraction)

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-01 Thread Sujit Pal
Hi Luc, Thanks for the feedback. I did not realize that the check for the ClassCastException was performance related. Let me know your thoughts once you get a chance to look at the patch, and I can put this back in and resubmit, ie if it is a RealMatrixImpl, then do what the methods with RealMatri

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-01 Thread Ted Dunning
Is performance in LUD normally achieved by fast element access? Or is it done by using higher order operators on a view of a row (or column)? I know the the Colt package made the argument that the latter it far preferable. I also know that Jama didn't do this, but was very hard to extend as a re

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-01 Thread Luc Maisonobe
Sujit Pal a écrit : > Hello, > > I am a new, but fairly happy user of commons-math 1.2 and I have begun > to use it in my code. I needed a sparse matrix implementation for some > data analysis work I was doing, and unfortunately the code with > RealMatrixImpl was coming back with an OOME. So I bui

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-01 Thread Ted Dunning
This is often handled by using an offset sparse matrix or vector that is sparse in that only elements different from the offset are stored. You can often do this at the algorithmic level by carrying around the requisite constant matrix in your derivation. Obviously, a normal sparse matrix is a sp

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-01 Thread Sujit Pal
Hi Ted, I considered that possibility too, peeked at one of the posts where this representation was suggested :-). Pros: 1) the representation is more elegant. Cons: 1) it would have required me to implement SparseVector, which we should do anyway, imo. But I wanted to keep the code changes to a

Re: [math] patch submitted for commons-math sparse matrix support

2008-12-01 Thread Ted Dunning
Sujit, What do you think the trade-offs are between the representation that you used and another one where you have a Map that contains rows or columns? On Mon, Dec 1, 2008 at 1:40 PM, Sujit Pal <[EMAIL PROTECTED]> wrote: > Hello, > > I am a new, but fairly happy user of commons-math 1.2 and I h

[math] patch submitted for commons-math sparse matrix support

2008-12-01 Thread Sujit Pal
Hello, I am a new, but fairly happy user of commons-math 1.2 and I have begun to use it in my code. I needed a sparse matrix implementation for some data analysis work I was doing, and unfortunately the code with RealMatrixImpl was coming back with an OOME. So I built a SparseRealMatrixImpl as a s