What are good resource to read up on for implementing numerical algorithms in pure java?
I know nothing about the interactions of the JVM & GC, and would love to learn more.
What are good resource to read up on for implementing numerical algorithms in pure java?
I know nothing about the interactions of the JVM & GC, and would love to learn more.
Java Number Cruncher is a good start. I don't think it deals with GC issues, though. Anyway, floating point precision issues are quite likely more relevant in numerical algorithms, usually. The book does demonstrate that doubles
can actually be inferior to floats
in some cases.
Numerics: http://math.nist.gov/javanumerics/ GC intro: http://www.ibm.com/developerworks/java/library/j-jtp11253/
Apache Commons Math has some nice linear algebra libraries, among other things.
Linear algebra is the basis for lots of serious numerical work (e.g., finite difference, finite element, and boundary element formulations for problems in solid and fluid mechanics and heat transfer). AFAIK, most of that work is still done by commercial and in-house packages written in FORTRAN. Java and even C++ and C were not considered performant enough for such things back when I did them for a living. I'd be surprised if that has changed.
Hi
Pick up a copy of Numerical Recipes in C++. NR doesn't always contain the best algorithms for the problems it tackles, it's a pedagogical text not a library of optimised code. But the explanations are generally good and the range of topics is wide. By picking up the C++ version you can learn some Java while you translate the code. Also pick up a good book on the basics of floating-point arithmetic and numerical analysis.
Regards
Mark
I enjoyed Object Oriented Implementation of Numerical Methods by Didier Besset. To be honest I use C++ almost exclusively but found this book interesting and fun nonetheless. It doesn't always use the best algorithm for the job, however.
I would also point you towards Matrix Computations by Golub & Van Loan. Not about Java by any means, but a mandatory text for anybody working in this area.