Java matrix libraries

六眼飞鱼酱① 提交于 2019-11-26 22:11:20

Try Apache Commons Math library. org.apache.commons.math3.linear package contains the functions that you want. Home page

Christian Fries

Some Java libraries for linear algebra are:

EDIT maybe we can extend this list whenever one comes across and you know - the world keeps moving:

Note: Personally: I use Apache Commons Math and Colt in my own project (http://www.finmath.net). While commons math is actively developed, I found that Colt is still faster in some tasks (like Eigenvalue decomposition). For that reason I use some kind of wrapper which allows me to quickly switch the underlying library (I only need a few things like solving systems of equations and Eigenvalue decomposition).

The interface for COLT gives you a generic OP: assign(matrix, function), which you can use to add or subtract matrices and vectors.

As the javadocs for assign() says:

Assigns the result of a function to each cell; x[row,col] =function(x[row,col],y[row,col]).

So by using using an addition function as function - you can add matrices.

There is also la4j library that supports functional programming features as functors. You can use transform() method with manual hi-order function.

alexey28

You can use this one. It is very simple and supply basic matrix operations.

You can add/substract/multiply etc 2d matrixes and vectors.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!