public class LUDecompositionCommonsResult extends Object implements LUDecompositionResult
LUDecompositionCommons).| Constructor and Description |
|---|
LUDecompositionCommonsResult(org.apache.commons.math3.linear.LUDecomposition lu)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDeterminant()
Return the determinant of the matrix.
|
DoubleMatrix |
getL()
Returns the $\mathbf{L}$ matrix of the decomposition.
|
DoubleMatrix |
getP()
Returns the rows permutation matrix, $\mathbf{P}$.
|
int[] |
getPivot()
Returns the pivot permutation vector.
|
DoubleMatrix |
getU()
Returns the $\mathbf{U}$ matrix of the decomposition.
|
double[] |
solve(double[] b)
Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.
|
DoubleArray |
solve(DoubleArray b)
Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.
|
DoubleMatrix |
solve(DoubleMatrix b)
Solves $\mathbf{A}x = \mathbf{B}$ where $\mathbf{A}$ is a (decomposed) matrix and $\mathbf{B}$ is a matrix.
|
public LUDecompositionCommonsResult(org.apache.commons.math3.linear.LUDecomposition lu)
lu - The result of the LU decomposition, not null. $\mathbf{L}$ cannot be singular.public double getDeterminant()
getDeterminant in interface LUDecompositionResultpublic DoubleMatrix getL()
$\mathbf{L}$ is a lower-triangular matrix.
getL in interface LUDecompositionResultpublic DoubleMatrix getP()
P is a sparse matrix with exactly one element set to 1.0 in each row and each column, all other elements being set to 0.0.
The positions of the 1 elements are given by the pivot permutation vector.
getP in interface LUDecompositionResultLUDecompositionResult.getPivot()public int[] getPivot()
getPivot in interface LUDecompositionResultpublic DoubleMatrix getU()
$\mathbf{U}$ is an upper-triangular matrix.
getU in interface LUDecompositionResultpublic DoubleArray solve(DoubleArray b)
solve in interface DecompositionResultb - the vector to calculate withpublic double[] solve(double[] b)
solve in interface DecompositionResultb - the vector to calculate withpublic DoubleMatrix solve(DoubleMatrix b)
solve in interface DecompositionResultb - the matrix to calculate withCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.