JAMA is a basic linear algebra Java package. Includes a basic matrix class and 5 matrix decomposition classes.
The Matrix class provides the basic function of linear algebraic numerical operations, and different constructors can construct two-dimensional arrays of double and floating-point precision, while different gets and sets methods can return sub-matrices and matrix elements.
Basic arithmetic operations include matrix addition, matrix multiplication, matrix normalization, and arithmetic operations based on matrix elements. Functions for printing matrices are also included.
The five major decomposition of matrices involves a pair or ternary group, a permutation vector matrix, etc., corresponding to the 5 matrix decomposition classes of JAMA. These decomposition classes can be accessed by the Matrix class, which can solve the linear equations, solve the determinant of square matrices, inverse and other matrix operations. These decomposition classes are as follows:
1. Cholesky decomposition of symmetric positive definite matrices
2, the matrix of LU decomposition (Gaussian elimination element)
3. QR Decomposition of matrices
4. Characteristic vector value decomposition for symmetric and asymmetric matrices
5. Singular value decomposition of matrices
JAMA function Summary such as
Use an example (first to introduce Jama.1.0.3.jar):
Import Jama.matrix;public class Matrix_test {public static void main (string[] args) {double[][] a = {{1,1,0},{0,1,0},{0,0, 1}};//creating matrices using two-dimensional arrays matrix matrix = new Matrix (a);//print matrix, the first parameter is the width of each column, the second parameter is the number of decimal places reserved Matrix.print (3, 2);// The inverse matrix.inverse of the matrix (). print (3,2);//to transpose The Matrix Matrix.transpose (). print (3,2);//Matrix multiplication matrix.transpose (). times (Matrix). Print (3,2);}}
Reference documents:
JAMA Jar Package: http://math.nist.gov/javanumerics/jama/
Official Document Address: http://math.nist.gov/javanumerics/jama/doc/
Jama:java Fabric Bundle: http://article.yeeyan.org/view/49656/40905
Java matrix operations, JAMA Package