An implementation of LinearSolver 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 {@link #quality()}function is provided.
A linear system is defined as: A*X = B.
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.
To solve a system:
To invert a matrix:
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 {@link org.ejml.alg.dense.linsol.LinearSolverSafe} can be used. Thefunctions {@link #modifiesA()} and {@link #modifiesB()} specify which input matrices are beingmodified.
@author Peter Abeles
|
|
|
|