Jump to content

Efficient Java Matrix Library

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pabeles (talk | contribs) at 21:47, 2 July 2013 (Created page with '{{Infobox software | author = Peter Abeles | operating system = Cross-platform | latest_release_version = 0.23 | latest_release_dat...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Efficient Java Matrix Library
Original author(s)Peter Abeles
Stable release
0.23 / June 23, 2013 (2013-06-23)
Repository
Operating systemCross-platform
TypeLibrary
LicenseLGPL
Websitecode.google.com/p/efficient-java-matrix-library/

Efficient Java Matrix Library (EJML) is a Java linear algebra library for manipulating dense matrices. Its design goals are; 1) to be as computationally and memory efficient as possible for both small and large matrices, and 2) to be accessible to both novices and experts. EJML is free, written in 100% Java and has been released under an LGPL license.

EJML has three distinct ways to interact with it. This allows a programmer to choose between simplicity and efficiency. 1) A simplified interface that allows a more object oriented way of programming. 2) Procedural interface that provides greater control over memory and speed. 3) Directly calling specialized algorithms [1].

Capabilities

EJML provides the following capabilities for dense matrices.

  • Basic Operators (addition, multiplication, ... )
  • Matrix Manipulation (extract, insert, combine, ... )
  • Linear Solvers (linear, least squares, incremental, ... )
  • Decompositions (LU, QR, Cholesky, SVD, Eigenvalue, ...)
  • Matrix Features (rank, symmetric, definitiveness, ... )
  • Random Matrices (covariance, orthogonal, symmetric, ... )
  • Different Internal Formats (row-major, block)
  • Unit Testing

Usage Example (SimpleMatrix)

Example of Singular Value Decomposition (SVD):

SimpleSVD s = matA.svd();
SimpleMatrix U=s.getU();
SimpleMatrix W=s.getW();
SimpleMatrix V=s.getV();

Example of matrix multiplication:

SimpleMatrix result = matA.mult(matB);

Usage Example (DenseMatrix64F)

Example of Singular Value Decomposition (SVD):

if( !DecompositionFactory.decomposeSafe(svd,matA) )
    throw new DetectedException("Decomposition failed");
DenseMatrix64F U = svd.getU(false);
DenseMatrix64F S = svd.getW(null);
DenseMatrix64F V = svd.getV(false);

Example of matrix multiplication:

CommonOps.mult(matA,matB,result);

See also

References

  1. ^ "EJML Project Page". EJML. Peter Abeles. Retrieved July 2, 2013.