On 3/29/06, Joni Salonen <[EMAIL PROTECTED]> wrote: > Hello! I read from the commons math web page that Q-R -decomposition > of matrices is on the wish list. Last night and this afternoon I had > some free time so I created a clean-room implementation of this > decomposition using Householder reflectors. The main source of > information was the description of the algorithm found in Wikipedia: > http://en.wikipedia.org/wiki/QR_decomposition > > I would be interested in working towards getting this algorithm > integrated in commons-math, but how should I proceed? And does anyone > have suggestions on how to improve the implementation? The source code > is downloadable from > http://www.student.oulu.fi/~jonisalo/QRDecomp.java > (should be understandable but may not be up to Apache standards yet)
Great! The first thing to do is to open a Bugzilla ticket and attach the code to it, with that apache license in the class file headers (look at any apache java class for an example). Ideally, you should also develop and include a test class. Your main method could be the start of this. Have a look at the RealMatrix test classes for examples. We can talk further about design here on the list. From a quick glance at your code, it looks like you have just implemented the decomp algorithm statically (which is a great start) and we should talk about how to structure the API, class name, numerical stability, and package placement. Let me know if you need help with mechanics of getting set up with Junit, maven, Bugzilla, etc. > > There is a problem with the current implementation though: it only > works for non-singular square matrices. What will the usage of the > algorithm be like? Should the singular and non-square cases be > implemented, too? Just handling square, non-singular is a great start, IMO. Thanks for your contribution! Phil --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
