commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] singular and non-square matrix inverse proposal
Date Tue, 23 Aug 2005 19:54:56 GMT
On 8/23/05, rand huso <rchuso@gmail.com> wrote:
> I've written a piece of code for working with matrices - oritinal
> version was early 1989 in Fortran77. Since I've recently started
> working with Java I tried converting some of my useful code (from my
> rather large C++ template), but I've run into a snag or two with the
> limited generics. The class uses double instead of T, and simple
> arrays instead of something like <ArrayList <ArrayList T>> where <T
> implements Numeric> or similar. I just couldn't make all that work
> yet.
> 
> The attached code and JUnit test are self-explanatory. Please have a
> look and let me know what you think. Is it worth integrating some of
> this into the jakarta-commons math library for others to use? If not,
> suggestions would be welcome.

Thanks for your interest in commons-math.  The attachment did not make
it.  It would be better to first post a little more info about what
exactly you would like to contribute (first look at the WishList), and
then attach code to Bugzilla tickets.  See the instructions here:
http://jakarta.apache.org/commons/math/developers.html
> 
> <note>I am still surprised to find any mathematics library that throws
> an exception when asked to invert a singular or non-square
> matrix.</note>

Out of curiousity, what exactly would you expect the result to be?  In
Java, we use exceptions rather than "return codes" or special return
values to indicate bad arguments or computational problems.  The one
exception to this is the use of NaN to represent the result of invalid
floating point operations, which is more or less required by IEEE 454 
(which we adhere to pretty consistently in [math]).
 
Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message