HOME

TheInfoList



OR:

Matrix Toolkit Java (MTJ) is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
software library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subr ...
for performing numerical
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as: :a_1x_1+\cdots +a_nx_n=b, linear maps such as: :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrices. ...
. The library contains a full set of standard linear algebra operations for dense matrices based on
BLAS Basic Linear Algebra Subprograms (BLAS) is a specification that prescribes a set of low-level routines for performing common linear algebra operations such as vector addition, scalar multiplication, dot products, linear combinations, and matrix ...
and
LAPACK LAPACK ("Linear Algebra Package") is a standard software library for numerical linear algebra. It provides routines for solving systems of linear equations and linear least squares, eigenvalue problems, and singular value decomposition. It also ...
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 In software design, the Java Native Interface (JNI) is a foreign function interface programming framework that enables Java code running in a Java virtual machine (JVM) to call and be called by native applications (programs specific to a hardwa ...
. 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". Several citations for MTJ can be found in scientific literature, including which uses its LU preconditioner. Performance of MTJ has been compared to other libraries, which can be found at Java Matrix Benchmark's site.


Capabilities

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 In linear algebra, an orthogonal matrix, or orthonormal matrix, is a real square matrix whose columns and rows are orthonormal vectors. One way to express this is Q^\mathrm Q = Q Q^\mathrm = I, where is the transpose of and is the identity ma ...
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

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

*
List of numerical analysis software Listed here are notable end-user computer applications intended for use with numerical or data analysis: Numerical-software packages General-purpose computer algebra systems Interface-oriented Language-oriented Historically significa ...


References

{{reflist, refs= {{cite web , url=http://code.google.com/p/matrix-toolkits-java/ , title=MTJ Project Page , work=MTJ, access-date=November 30, 2012 {{cite conference , author = McMahan, H.B. , author2=Gordon, G.J. , year = 2005 , title = Fast exact planning in Markov decision processes , book-title = Proc. of the 15th International Conference on Automated Planning and Scheduling (ICAPS-05) , url = https://www.cs.cmu.edu/~ggordon/mcmahan-gordon.fast-mdp.pdf {{cite web , url=https://code.google.com/p/java-matrix-benchmark/ , title=Java Matrix Benchmark , access-date=December 6, 2012 Numerical software