org.apache.commons.math4.field.linalg

## Interface FieldDecompositionSolver<T>

• Type Parameters:
T - Type of the field elements.

public interface FieldDecompositionSolver<T>
Interface handling decomposition algorithms that can solve A X = B.

Decomposition algorithms decompose an A matrix has a product of several specific matrices from which they can solve the above system of equations in a least-squares sense: Find X such that ||A X - B|| is minimal.

Some solvers like FieldLUDecomposition can only find the solution for square matrices and when the solution is an exact linear solution, i.e. when ||A X - B|| is exactly 0. Other solvers can also find solutions with non-square matrix A and with non-zero minimal norm. If an exact linear solution exists it is also the minimal norm solution.

Since:
4.0
• ### Method Summary

All Methods
Modifier and Type Method and Description
FieldDenseMatrix<T> getInverse()
Computes the inverse of a decomposed (square) matrix.
FieldDenseMatrix<T> solve(FieldDenseMatrix<T> b)
Solves the linear equation A X = B.
• ### Method Detail

• #### solve

FieldDenseMatrix<T> solve(FieldDenseMatrix<T> b)
Solves the linear equation A X = B.

Matrix A is implicit: It is provided by the underlying decomposition algorithm.

Parameters:
b - Right-hand side of the equation.
Returns:
the matrix X that minimizes ||A X - B||.
Throws:
IllegalArgumentException - if the dimensions do not match.
• #### getInverse

FieldDenseMatrix<T> getInverse()
Computes the inverse of a decomposed (square) matrix.
Returns:
the inverse matrix.