commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vanessa Sabino <borbol...@gmail.com>
Subject [math] Numerical integration proposal and Linear system solving suggestion
Date Sun, 06 Nov 2005 04:09:26 GMT
Hi,

I've read in the Numerical Analysis section of the Commons Math
documentation that numerical integration was a possible future addition, so
I've decided to adapt my Simpson's Rule implementation to follow the same
structure I've seen in the rest of the code of the
org.apache.commons.math.analysis package, so that it could be added to the
commons math if you like it.
It can be found at http://www.linux.ime.usp.br/~bani/jakarta/

Actually, this code was part of a whole program to find solutions for
differential equations using the Galerkin minimization method and there is
one more thing I've implemented in it that I think might be useful:
I've noticed that RealMatrix in the org.apache.commons.math.linear package
uses LU decomposition to solve the system. Although LU is good in the
general case, there are better algorithms for specific cases, so it might be
a good idea to have an overloaded version of solve which receives an int
indicating which method to use.
We could have the constants:
CHOLESKY (much faster and more precise, but only works with Symmetric
Positive-Definite systems - we could automatically switch to LU if it isn't
symmetric positive-definite)
QR_GRAM-SCHMIDT
QR_HOUSEHOLDER (QR has the advantages of orthogonal matrices and retains the
condition number of the system, one method is better when there are a lot of
zeros in the matrix)
ans so on...

What do you think?


-- Vanessa Sabino

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message