private static class FieldLUDecomposition.Solver<T extends FieldElement<T>> extends java.lang.Object implements FieldDecompositionSolver<T>
| Modifier and Type | Field and Description |
|---|---|
private Field<T> |
field
Field to which the elements belong.
|
private T[][] |
lu
Entries of LU decomposition.
|
private int[] |
pivot
Pivot permutation associated with LU decomposition.
|
private boolean |
singular
Singularity indicator.
|
| Modifier | Constructor and Description |
|---|---|
private |
FieldLUDecomposition.Solver(Field<T> field,
T[][] lu,
int[] pivot,
boolean singular)
Build a solver from decomposed matrix.
|
| Modifier and Type | Method and Description |
|---|---|
FieldMatrix<T> |
getInverse()
Get the inverse (or pseudo-inverse) of the decomposed matrix.
|
boolean |
isNonSingular()
Check if the decomposed matrix is non-singular.
|
ArrayFieldVector<T> |
solve(ArrayFieldVector<T> b)
Solve the linear equation A × X = B.
|
FieldMatrix<T> |
solve(FieldMatrix<T> b)
Solve the linear equation A × X = B for matrices A.
|
FieldVector<T> |
solve(FieldVector<T> b)
Solve the linear equation A × X = B for matrices A.
|
private final Field<T extends FieldElement<T>> field
private final T extends FieldElement<T>[][] lu
private final int[] pivot
private final boolean singular
private FieldLUDecomposition.Solver(Field<T> field, T[][] lu, int[] pivot, boolean singular)
field - field to which the matrix elements belonglu - entries of LU decompositionpivot - pivot permutation associated with LU decompositionsingular - singularity indicatorpublic boolean isNonSingular()
isNonSingular in interface FieldDecompositionSolver<T extends FieldElement<T>>public FieldVector<T> solve(FieldVector<T> b)
The A matrix is implicit, it is provided by the underlying decomposition algorithm.
solve in interface FieldDecompositionSolver<T extends FieldElement<T>>b - right-hand side of the equation A × X = Bpublic ArrayFieldVector<T> solve(ArrayFieldVector<T> b)
The A matrix is implicit here. It is
b - right-hand side of the equation A × X = BDimensionMismatchException - if the matrices dimensions do not match.SingularMatrixException - if the decomposed matrix is singular.public FieldMatrix<T> solve(FieldMatrix<T> b)
The A matrix is implicit, it is provided by the underlying decomposition algorithm.
solve in interface FieldDecompositionSolver<T extends FieldElement<T>>b - right-hand side of the equation A × X = Bpublic FieldMatrix<T> getInverse()
getInverse in interface FieldDecompositionSolver<T extends FieldElement<T>>Copyright (c) 2003-2015 Apache Software Foundation