Matrix Toolkit Java
Original authorBjørn-Ove Heimsund
Release2003; 23 years ago (2003)
Preview release
0.9.14 / November 22, 2011 (2011-11-22)
Written inJava
TypeApplication programming interface (API)
LicenseLGPL
Repositorygithub.com/fommil/matrix-toolkits-java

Matrix Toolkit Java (MTJ) is an open-source Java software library for performing numerical linear algebra. The library contains a full set of standard linear algebra operations for dense matrices based on BLAS and LAPACK code. Partial set of sparse operations is provided through the Templates project. The library can be configured to run as a pure Java library or use BLAS machine-optimized code through the Java Native Interface.

MTJ was originally developed by Bjørn-Ove Heimsund, who has taken a step back due to other commitments. The project webpage states that "(The new maintainers are) primarily concerned with keeping the library maintained, and fixing bugs as they are discovered. There is no road plan for future releases".[1]

Several citations for MTJ can be found in scientific literature, including [2] which uses its LU preconditioner. Performance of MTJ has been compared to other libraries, which can be found at Java Matrix Benchmark's site.[3]

Capabilities

edit

The following is an overview of MTJ's capabilities, as listed on the project's website:

  • Datastructures for dense and structured sparse matrices in the following formats:
    • Dense, column major.
    • Banded matrices, which store only a few diagonals.
    • Packed matrices, storing only half the matrices (for triangular or symmetric matrices).
    • Tridiagonal and symmetric tridiagonal matrices.
  • Transparent support for symmetric and triangular storage.
  • Datastructures for unstructured sparse matrices in these formats:
    • Compressed row or column storage (CRS/CCS).
    • Flexible CRS/CCS, using growable sparse vectors.
    • Compressed diagonal storage (CDS).
  • The dense and structured sparse matrices are built on top of BLAS and LAPACK, and include the following intrinsic operations:
    • Matrix/vector multiplication.
    • Matrix/matrix multiplication.
    • Rank updates by matrices or vectors.
    • Direct matrix solvers.
  • The unstructured sparse matrices supports the same operations as the structured ones, except they do not have direct solvers. However, their matrix/vector multiplication methods are optimised for use in iterative solvers.
  • Matrix decompositions of dense and structured sparse matrices:
    • LU and Cholesky.
    • Eigenvalue decompositions for unsymmetrical dense matrices.
    • Singular value decompositions for unsymmetrical dense matrices.
    • Eigenvalue decompositions for symmetrical matrices (tridiagonal, banded, packed and dense).
    • Orthogonal matrix decompositions for dense matrices (QR, RQ, LQ, and QL).
  • Iterative solvers for unstructured sparse matrices from the Templates project:
    • BiConjugate gradients.
    • BiConjugate gradients stabilized.
    • Conjugate gradients.
    • Conjugate gradients squared.
    • Chebyshev iteration.
    • Generalized minimal residual (GMRES).
    • Iterative refinement (Richardson's method).
    • Quasi-minimal residual.
  • A selection of algebraic preconditioners:
    • Diagonal preconditioning.
    • Symmetrical successive overrelaxation.
    • Incomplete Cholesky.
    • Incomplete LU.
    • Incomplete LU with fill-in using thresholding.
    • Algebraic multigrid by smoothed aggregation.

Usage Examples

edit

Example of Singular Value Decomposition (SVD):

SVD svd = new SVD(matA.numRows(),matA.numColumns());
SVD s = svd.factor(matA);
DenseMatrix U = s.getU();
DenseMatrix S = s.getS();
DenseMatrix Vt = s.getVt();

Example of matrix multiplication:

DenseMatrix result = new DenseMatrix(matA.numRows(),matB.numColumns());
matA.mult(matB,result);

See also

edit

References

edit
  1. ^ "MTJ Project Page". MTJ. Retrieved November 30, 2012.
  2. ^ McMahan, H.B.; Gordon, G.J. (2005). "Fast exact planning in Markov decision processes" (PDF). Proc. of the 15th International Conference on Automated Planning and Scheduling (ICAPS-05).
  3. ^ "Java Matrix Benchmark". Retrieved December 6, 2012.
edit

📚 Artikel Terkait di Wikipedia

List of Java software and tools

software components for use in spaceflight applications for Java or MATLAB Matrix Toolkit Java (MTJ) – linear algebra library with BLAS and LAPACK support

List of JVM languages

that are used to produce computer software that runs on the Java Virtual Machine (JVM). A Java program interprets some of these languages, and others are

Outline of the Java programming language

following outline is provided as an overview of and topical guide to Java: Java is a general-purpose, concurrent, object-oriented, class-based, strong

Google Guava

as Google Web Toolkit and Guava, constituted 7 of the top 100 most popular libraries in Java, and that Guava was the 8th most popular Java library. Computer

List of numerical libraries

parallel extension of Colt. Matrix Toolkit Java is a linear algebra library based on BLAS and LAPACK. ojAlgo is an open source Java library for mathematics

Parallel Colt

adapted from Matrix Toolkit Java Nonlinear Optimization Java translations of the 1-dimensional minimization routine from the MINPACK Matrix reader/writer

Lists of open-source artificial intelligence software

Mallet – Java "Machine Learning for Language Toolkit" MontyLingua – libraries and programs for symbolic and statistical NLP for both Python and Java Moses

Java (programming language)

(WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are usually compiled