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 selfexplanatory. Please have a
> look and let me know what you think. Is it worth integrating some of
> this into the jakartacommons math library for others to use? If not,
> suggestions would be welcome.
Thanks for your interest in commonsmath. 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 nonsquare
> 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, email: commonsdevunsubscribe@jakarta.apache.org
For additional commands, email: commonsdevhelp@jakarta.apache.org
