Package org.apache.commons.math3.linear
Class FieldLUDecomposition.Solver<T extends FieldElement<T>>
java.lang.Object
org.apache.commons.math3.linear.FieldLUDecomposition.Solver<T>
- Type Parameters:
T- the type of the field elements
- All Implemented Interfaces:
FieldDecompositionSolver<T>
- Enclosing class:
FieldLUDecomposition<T extends FieldElement<T>>
private static class FieldLUDecomposition.Solver<T extends FieldElement<T>>
extends Object
implements FieldDecompositionSolver<T>
Specialized solver.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the inverse (or pseudo-inverse) of the decomposed matrix.booleanCheck if the decomposed matrix is non-singular.solve(ArrayFieldVector<T> b) Solve the linear equation A × X = B.solve(FieldMatrix<T> b) Solve the linear equation A × X = B for matrices A.solve(FieldVector<T> b) Solve the linear equation A × X = B for matrices A.
-
Field Details
-
field
Field to which the elements belong. -
lu
Entries of LU decomposition. -
pivot
private final int[] pivotPivot permutation associated with LU decomposition. -
singular
private final boolean singularSingularity indicator.
-
-
Constructor Details
-
Solver
Build a solver from decomposed matrix.- Parameters:
field- field to which the matrix elements belonglu- entries of LU decompositionpivot- pivot permutation associated with LU decompositionsingular- singularity indicator
-
-
Method Details
-
isNonSingular
public boolean isNonSingular()Check if the decomposed matrix is non-singular.- Specified by:
isNonSingularin interfaceFieldDecompositionSolver<T extends FieldElement<T>>- Returns:
- true if the decomposed matrix is non-singular
-
solve
Solve the linear equation A × X = B for matrices A.The A matrix is implicit, it is provided by the underlying decomposition algorithm.
- Specified by:
solvein interfaceFieldDecompositionSolver<T extends FieldElement<T>>- Parameters:
b- right-hand side of the equation A × X = B- Returns:
- a vector X that minimizes the two norm of A × X - B
-
solve
Solve the linear equation A × X = B.The A matrix is implicit here. It is
- Parameters:
b- right-hand side of the equation A × X = B- Returns:
- a vector X such that A × X = B
- Throws:
DimensionMismatchException- if the matrices dimensions do not match.SingularMatrixException- if the decomposed matrix is singular.
-
solve
Solve the linear equation A × X = B for matrices A.The A matrix is implicit, it is provided by the underlying decomposition algorithm.
- Specified by:
solvein interfaceFieldDecompositionSolver<T extends FieldElement<T>>- Parameters:
b- right-hand side of the equation A × X = B- Returns:
- a matrix X that minimizes the two norm of A × X - B
-
getInverse
Get the inverse (or pseudo-inverse) of the decomposed matrix.- Specified by:
getInversein interfaceFieldDecompositionSolver<T extends FieldElement<T>>- Returns:
- inverse matrix
-