用于涉及复数的矩阵运算的Java库?
我想将我的一些信号处理代码从 C++ 重写为 Java。我最终得到了复数矩阵(具有虚部的数字)。我需要找到 NxN 复矩阵的逆矩阵,以及主特征向量。
有几个 Java 库可以对实数执行此操作,但我找不到任何支持复数的库。我找到了一个库,但它是专有的,必须获得许可。
这已经在任何地方实施了吗?
我始终可以使用 JNI 包装所需的 C 代码,但这样做是为了避免平台依赖性。
I want to rewrite some signal processing code of mine from C++ to Java. I wind up with matrices of complex numbers (numbers with imaginary components). I need to find the inverse of an NxN complex matrix, as well as the principle eigenvector.
There are several Java libraries to do this with real numbers, but I couldn't find anything that supported complex numbers. I found one library but it was proprietary and had to be licensed.
Has this been implemented anywhere?
I can always wrap the needed C code with JNI, but I was doing this to avoid platform dependence.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我推荐 Apache Commons Math。我相信它会从《JAMA》中断的地方继续下去。
I'd recommend Apache Commons Math. I believe that it carries on from where JAMA left off.
在过去的大学课程中,我曾与 JAMA 合作。
In a past university course, I worked with JAMA.
有一个 java LAPACK 基本上是 FORTRAN 语言的自动翻译: http://www.netlib.org /java/f2j/ 。不幸的是,打包的源代码不包括复杂的源代码,但我想您可以对它们应用相同的技术。虽然可能需要付出很多努力,但我不能保证表现令人满意。
另请参阅 JavaNumerics,网址为 http://math.nist.gov/javanumerics/#libraries .他们有一个非常全面的列表,列出了可能对您有帮助的事情。
There is a java LAPACK that's basically an automatic translation of the FORTRAN one: http://www.netlib.org/java/f2j/ . The packaged sources don't include the complex ones unfortunately, but you can apply the same technique to those, I guess. Might be a lot of effort though, and I can't vouch for the performance to be satisfactory.
Also have a look at JavaNumerics at http://math.nist.gov/javanumerics/#libraries . They have a quite comprehensive list of things that might help you.
我推荐 Michael Thomas Flanagan 的 Java Scientific Library:http://www.ee .ucl.ac.uk/~mflanaga/java/index.html
我发现它比迄今为止本文中提到的其他方法更容易使用。
I recommend Michael Thomas Flanagan's Java Scientific Library: http://www.ee.ucl.ac.uk/~mflanaga/java/index.html
I found it much easier to use than the others mentioned in this post so far.
cern.colt 值得尝试。
cern.colt is worth trying.