Package com.mvohm.quadmatrix
package com.mvohm.quadmatrix
A simple library for matrix calculations on square matrices of real numbers, with different levels of precision.
Includes
- Matrix -- a generic abstract class which defines the set of operations that all its subclasses must implement;
- DoubleMatrix -- a subclass of the Matrix that
stores the matrix data and implements operations on them using primitive
doubletype; - BigDecimalMatrix -- a subclass of the Matrix
that stores the matrix data and implements operations on them using
BigDecimalclass, which allows to gain (theoretically) unlimited precision; - QuadrupleMatrix -- a subclass of the Matrix
that stores the matrix data and implements operations on them using
Quadrupleclass (see Github repository), which allows to gain an accuracy of about 36 decimal places (mat vary depending on the matrix size and the nature of performed operation) and performs calculations much faster thanBigDecimalMatrix.
-
ClassesClassDescriptionAn implementation of the abstract class
Matrixthat uses an array ofBigDecimalvalues to store the internal data and arithmetic provided byBigDecimalto perform calculations.An implementation of the abstract classMatrixthat uses an array of primitivedoublevalues to store the matrix elements and standarddoublearithmetic to perform calculations.A generic abstract class which defines the set of operations that all its subclasses must implement.
Instances of subclasses are capable of: solving systems of linear equations of the forms A * X = B and A * x = b, including versions with enhanced accuracy that use an iterative refinement of the solution (see Matrix.solve(Number[]), Matrix.solveAccurately(Number[]), Matrix.solve(Matrix) and alike); inversion (including a version with enhanced accuracy) and transposition of the matrix; multiplying this matrix by another matrix, by a vector, and by a scalar; addition and subtraction of a matrix; computation of the determinant.