la4j - Java的线性代数

jopen 12年前

la4j - Java的线性代数
la4j - 是一个单线程,开源的,纯Java类库,提供了线性代数的原语和算法。
以是它的一些主要特性:

  • 没有依赖和小规模 (~100kb jar)
  • 简约和完全面向对象的API
  • (CRS, CCS) 和 密(1D/2D arrays) 矩阵支持
  • 线性方程组求解 (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
  • 矩阵分解 (Eigenvalues, SVD, QR, LU, Cholesky and other)
  • MatrixMarket/CSV IO 矩阵和向量格式支持

    Factory basic2d = new Basic2DFactory();      Factory crs = new CRSFactory();             // a - is 3x3 dense 2D-array matrix      Matrix a = basic2d.createMatrix(new double[][] {      {1.0, 0.0, 0.0},      {0.0, 5.0, 0.0},      {0.0, 0.0, 9.0}      });             // b - is 3x4 sparse CRS matrix      Matrix b = crs.createMatrix(3, 4);             // c - is 5x5 random dense 2D-array matrix      Matrix c = basic2d.createRandomMatrix(5, 5);             // d - is 10x10 identity dense 2D-array matrix      Matrix d = basic2d.createIdentityMatrix(10);             // convert dense 2D-array to sparse CRS matrix      Matrix e = a.copy(crs);             // convert sparse CSR to dense 2D-array matrix      Matrix f = b.copy(basic2d);

项目主页:http://www.open-open.com/lib/view/home/1357741577590