如何编写数值java代码?
在纯 Java 中实现数值算法有哪些好的资源可供阅读?
我对 JVM 和 JVM 之间的交互一无所知。 GC,并且很想了解更多。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我喜欢 Didier Besset 的数值方法的面向对象实现。老实说,我几乎只使用 C++,但仍然发现这本书很有趣。然而,它并不总是使用适合工作的最佳算法。
我还想向您推荐 Golub 的矩阵计算范贷款。无论如何,这与 Java 无关,但对于从事该领域工作的任何人来说都是必读的文本。
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.
获取一份《C++ 数值食谱》的副本。 NR 并不总是包含针对其解决的问题的最佳算法,它是教学文本而不是优化代码库。但解释总体不错,主题范围也很广。通过选择 C++ 版本,您可以在翻译代码的同时学习一些 Java。还可以选择一本关于浮点算术和数值分析基础知识的好书。
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 optimized 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.
数值:http://math.nist.gov/javanumerics/
GC 简介: http://www.ibm.com/developerworks/java/库/j-jtp11253/
Numerics: http://math.nist.gov/javanumerics/
GC intro: http://www.ibm.com/developerworks/java/library/j-jtp11253/
Java Number Cruncher 是一个好的开始。但我不认为它涉及 GC 问题。无论如何,通常,浮点精度问题很可能与数值算法更相关。这本书确实证明了在某些情况下,双精度数实际上不如浮点数。
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 tofloats
in some cases.Apache Commons Math 有一些不错的线性代数库等等。
线性代数是许多严肃数值工作的基础(例如,固体和流体力学以及传热问题的有限差分、有限元和边界元公式)。 AFAIK,大部分工作仍然是由用 FORTRAN 编写的商业和内部软件包完成的。当我以此为生时,Java 甚至 C++ 和 C 都被认为没有足够的性能来完成这些事情。如果情况发生改变,我会感到惊讶。
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.