Class LuDecomposition
Class for calculating and doing operations with an LU decomposition
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Math
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class LuDecomposition
Constructors
LuDecomposition(Matrix)
Constructs an instance and performs the decomposition on the given matrix.
Declaration
public LuDecomposition(Matrix A)
Parameters
Type | Name | Description |
---|---|---|
Matrix | A |
LuDecomposition(Int32, Int32)
Creates a new instance with a given number of rows and columns
Declaration
public LuDecomposition(int nRows, int nCols)
Parameters
Type | Name | Description |
---|---|---|
Int32 | nRows | Number of rows |
Int32 | nCols | Number of columns |
Remarks
Currently this only supports square matrices
Fields
LU
Stores the permuted L in the lower triangle (whose diagonal is assumed to be 1), with U in the upper triangle and diagonal.
Declaration
public Matrix LU
Field Value
Type | Description |
---|---|
Matrix |
Methods
Decompose()
Performs the decomposition for this instance
Declaration
public void Decompose()
Decompose(Matrix)
Decomposes the matrix A
Declaration
public void Decompose(Matrix A)
Parameters
Type | Name | Description |
---|---|---|
Matrix | A |
Determinant()
Compute the determinant of the decomposed matrix. The decomposition is assumed to have been performed.
Declaration
public double Determinant()
Returns
Type | Description |
---|---|
Double |
InPlace(Matrix)
Creates performs and returns an LuDecomposition on a given matrix.
Declaration
public static LuDecomposition InPlace(Matrix A)
Parameters
Type | Name | Description |
---|---|---|
Matrix | A |
Returns
Type | Description |
---|---|
LuDecomposition |
Solve(Vector)
Solves Ay = x for y, leaving the result in x.
Declaration
public void Solve(Vector x)
Parameters
Type | Name | Description |
---|---|---|
Vector | x |