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
double
type; - BigDecimalMatrix -- a subclass of the Matrix
that stores the matrix data and implements operations on them using
BigDecimal
class, which allows to gain (theoretically) unlimited precision; - QuadrupleMatrix -- a subclass of the Matrix
that stores the matrix data and implements operations on them using
Quadruple
class (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
Matrix
that uses an array ofBigDecimal
values to store the internal data and arithmetic provided byBigDecimal
to perform calculations.An implementation of the abstract classMatrix
that uses an array of primitivedouble
values to store the matrix elements and standarddouble
arithmetic 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.