Interface LinearSolverDense<T extends Matrix>
-
- All Superinterfaces:
LinearSolver<T,T>
- All Known Implementing Classes:
LinearSolverSafe
public interface LinearSolverDense<T extends Matrix> extends LinearSolver<T,T>
An implementation of LinearSolverDense solves a linear system or inverts a matrix. It masks more complex implementation details, while giving the programmer control over memory management and performance. To quickly detect nearly singular matrices without computing the SVD the
LinearSolver.quality()function is provided.A linear system is defined as: A*X = B.
To solve a system:
where A ∈ ℜ m × n, X ∈ ℜ n × p, B ∈ ℜ m × p. Different implementations can solve different types and shapes in input matrices and have different memory and runtime performance.
- Call
LinearSolver.setA(org.ejml.data.Matrix) - Call
LinearSolver.solve(org.ejml.data.Matrix, org.ejml.data.Matrix).
To invert a matrix:
A matrix can also be inverted by passing in an identity matrix to solve, but this will be slower and more memory intensive than the specialized invert() function.
IMPORTANT: Depending upon the implementation, input matrices might be overwritten by the solver. This reduces memory and computational requirements and give more control to the programmer. If the input matrices need to be not modified then
LinearSolverSafecan be used. The functionsLinearSolver.modifiesA()andLinearSolver.modifiesB()specify which input matrices are being modified.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinvert(T A_inv)Computes the inverse of of the 'A' matrix passed intoLinearSolver.setA(Matrix)and writes the results to the provided matrix.-
Methods inherited from interface org.ejml.interfaces.linsol.LinearSolver
getDecomposition, modifiesA, modifiesB, quality, setA, solve
-
-
-
-
Method Detail
-
invert
void invert(T A_inv)
Computes the inverse of of the 'A' matrix passed intoLinearSolver.setA(Matrix)and writes the results to the provided matrix. If 'A_inv' needs to be different from 'A' is implementation dependent.- Parameters:
A_inv- Where the inverted matrix saved. Modified.
-
-