The library provides mathematical operations which involve matrices and scalars. Names used here are : Matrix is equivalent to Array of two dimensions. The size is defined by number of rows (the first argument of the array) and number of columns (second argument). Vector is an Array of one dimension. Scalar is a single number. The library includes: Operations of a Scalar and a Matrix Operations between two matrices Operations on a single matrix There are no limitations on the size of the matrices or vectors. There is no checking for incorrect dimensions of the matrices. If not otherwise defined, all methods return 1 at completion. The Library makes use of BigDecimal numbers to improve accuracy by minimizing truncation errors.
Dot-multiply two vectors (each element is multiplied by the parallel element of the other vector and the result is the sum of all multiplied pairs). Length refer to the length of the two vectors which must be the same. The result is returned by the method.
Vector-Multiply two matrices. Rows and Cols refer to the rows and columns of MatrixA, MatrixB has to be with Cols rows and Rows columns, MatrixC is the result and is of dimension Rows by Rows. MatrixC = MatrixA X MatrixB.
Solves a set of linear equations of the form AX = B, where A is represented by MatrixA, B is represented by MatrixB and the unknown matrix X is the result MatrixX. Returns 0 if the determinant is 0 (hence there is no solution). Size defines the size of the square MatrixA, Cols define the number of columns in MatrixB and in MatrixX.
Solves a set of linear equations of the form AX = B, where A is represented by MatrixA, B is represented by VectorB and the unknowns vector X is the result VectorX. Returns 0 if the determinant is 0 (hence there is no solution). Size defines the size of the square MatrixA, and the length of VectorB and VectorX.