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 than BigDecimalMatrix.
The current version is limited to square matrices and does not provide any optimization for sparse matrices.
  • Classes
    Class
    Description
    An implementation of the abstract class Matrix that uses an array of BigDecimal values to store the internal data and arithmetic provided by BigDecimal to perform calculations.
    An implementation of the abstract class Matrix that uses an array of primitive double values to store the matrix elements and standard double 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.
    An implementation of the abstract class Matrix that uses an array of Quadruple values to store the internal data and arithmetic provided by Quadruple to perform calculations.