Class QRDecompositionCommonsResult
- java.lang.Object
-
- com.opengamma.strata.math.impl.linearalgebra.QRDecompositionCommonsResult
-
- All Implemented Interfaces:
QRDecompositionResult,DecompositionResult
public class QRDecompositionCommonsResult extends Object implements QRDecompositionResult
Wrapper for results of the Commons implementation of QR Decomposition (QRDecompositionCommons).
-
-
Constructor Summary
Constructors Constructor Description QRDecompositionCommonsResult(org.apache.commons.math3.linear.QRDecomposition qr)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleMatrixgetQ()Returns the matrix $\mathbf{Q}$ of the decomposition.DoubleMatrixgetQT()Returns the transpose of the matrix $\mathbf{Q}$ of the decomposition.DoubleMatrixgetR()Returns the matrix $\mathbf{R}$ of the decomposition.double[]solve(double[] b)Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.DoubleArraysolve(DoubleArray b)Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.DoubleMatrixsolve(DoubleMatrix b)Solves $\mathbf{A}x = \mathbf{B}$ where $\mathbf{A}$ is a (decomposed) matrix and $\mathbf{B}$ is a matrix.
-
-
-
Method Detail
-
getQ
public DoubleMatrix getQ()
Returns the matrix $\mathbf{Q}$ of the decomposition.$\mathbf{Q}$ is an orthogonal matrix.
- Specified by:
getQin interfaceQRDecompositionResult- Returns:
- the $\mathbf{Q}$ matrix
-
getQT
public DoubleMatrix getQT()
Returns the transpose of the matrix $\mathbf{Q}$ of the decomposition.$\mathbf{Q}$ is an orthogonal matrix.
- Specified by:
getQTin interfaceQRDecompositionResult- Returns:
- the $\mathbf{Q}$ matrix
-
getR
public DoubleMatrix getR()
Returns the matrix $\mathbf{R}$ of the decomposition.$\mathbf{R}$ is an upper-triangular matrix.
- Specified by:
getRin interfaceQRDecompositionResult- Returns:
- the $\mathbf{R}$ matrix
-
solve
public DoubleArray solve(DoubleArray b)
Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.- Specified by:
solvein interfaceDecompositionResult- Parameters:
b- the vector to calculate with- Returns:
- the vector x
-
solve
public double[] solve(double[] b)
Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.- Specified by:
solvein interfaceDecompositionResult- Parameters:
b- the vector to calculate with- Returns:
- the vector x
-
solve
public DoubleMatrix solve(DoubleMatrix b)
Solves $\mathbf{A}x = \mathbf{B}$ where $\mathbf{A}$ is a (decomposed) matrix and $\mathbf{B}$ is a matrix.- Specified by:
solvein interfaceDecompositionResult- Parameters:
b- the matrix to calculate with- Returns:
- the matrix x
-
-