Class JaggedLuDecomposition
LU decomposition of a jagged rectangular matrix.
Inheritance
Implements
Namespace: ISynergy.Framework.Mathematics.Decompositions
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public sealed class JaggedLuDecomposition : ICloneable, ISolverArrayDecomposition<double>
Remarks
For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n
unit lower triangular matrix L, an n-by-n upper triangular matrix U,
and a permutation vector piv of length m so that A(piv) = L*U.
If m < n, then L is m-by-m and U is m-by-n.
The LU decomposition with pivoting always exists, even if the matrix is singular, so the constructor will never fail. The primary use of the LU decomposition is in the solution of square systems of simultaneous linear equations. This will fail if Nonsingular returns false.
If you need to compute a LU decomposition for matrices with data types other than double, see JaggedLuDecomposition. If you need to compute a LU decomposition for a multidimensional matrix, see LuDecomposition, LuDecomposition.
Constructors
View SourceJaggedLuDecomposition(Double[][], Boolean, Boolean)
Constructs a new LU decomposition.
Declaration
public JaggedLuDecomposition(double[][] value, bool transpose = false, bool inPlace = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[][] | value | The matrix A to be decomposed. |
| System.Boolean | transpose | True if the decomposition should be performed on the transpose of A rather than A itself, false otherwise. Default is false. |
| System.Boolean | inPlace | True if the decomposition should be performed over the
|
Properties
View SourceDeterminant
Returns the determinant of the matrix.
Declaration
public double Determinant { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
LogDeterminant
Returns the log-determinant of the matrix.
Declaration
public double LogDeterminant { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
LowerTriangularFactor
Returns the lower triangular factor L with A=LU.
Declaration
public double[][] LowerTriangularFactor { get; }
Property Value
| Type | Description |
|---|---|
| System.Double[][] |
Nonsingular
Returns if the matrix is non-singular (i.e. invertible).
Declaration
public bool Nonsingular { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
PivotPermutationVector
Returns the pivot permutation vector.
Declaration
public int[] PivotPermutationVector { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32[] |
UpperTriangularFactor
Returns the lower triangular factor L with A=LU.
Declaration
public double[][] UpperTriangularFactor { get; }
Property Value
| Type | Description |
|---|---|
| System.Double[][] |
Methods
View SourceClone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new object that is a copy of this instance. |
GetInformationMatrix()
Computes (Xt * X)^1 (the inverse of the covariance matrix). This
matrix can be used to determine standard errors for the coefficients when
solving a linear set of equations through any of the
Declaration
public double[][] GetInformationMatrix()
Returns
| Type | Description |
|---|---|
| System.Double[][] |
Inverse()
Solves a set of equation systems of type A * X = I.
Declaration
public double[][] Inverse()
Returns
| Type | Description |
|---|---|
| System.Double[][] |
Reverse()
Reverses the decomposition, reconstructing the original matrix X.
Declaration
public double[][] Reverse()
Returns
| Type | Description |
|---|---|
| System.Double[][] |
Solve(Double[])
Solves a set of equation systems of type A * X = B.
Declaration
public double[] Solve(double[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[] | value | Right hand side column vector with as many rows as |
Returns
| Type | Description |
|---|---|
| System.Double[] | Matrix |
Solve(Double[][])
Solves a set of equation systems of type A * X = B.
Declaration
public double[][] Solve(double[][] value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[][] | value | Right hand side matrix with as many rows as |
Returns
| Type | Description |
|---|---|
| System.Double[][] | Matrix |
SolveForDiagonal(Double[])
Solves a set of equation systems of type A * X = B where B is a diagonal matrix.
Declaration
public double[][] SolveForDiagonal(double[] diagonal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[] | diagonal | Diagonal fo the right hand side matrix with as many rows as |
Returns
| Type | Description |
|---|---|
| System.Double[][] | Matrix |
SolveTranspose(Double[][])
Solves a set of equation systems of type X * A = B.
Declaration
public double[][] SolveTranspose(double[][] value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[][] | value | Right hand side matrix with as many columns as |
Returns
| Type | Description |
|---|---|
| System.Double[][] | Matrix |