JaggedLuDecompositionD Class 
Namespace: Accord.Math.Decompositions
The JaggedLuDecompositionD type exposes the following members.
Name  Description  

JaggedLuDecompositionD 
Constructs a new LU decomposition.

Name  Description  

Determinant 
Returns the determinant of the matrix.
 
LogDeterminant 
Returns the logdeterminant of the matrix.
 
LowerTriangularFactor 
Returns the lower triangular factor L with A=LU.
 
Nonsingular 
Returns if the matrix is nonsingular (i.e. invertible).
 
PivotPermutationVector 
Returns the pivot permutation vector.
 
UpperTriangularFactor 
Returns the lower triangular factor L with A=LU.

Name  Description  

Clone 
Creates a new object that is a copy of the current instance.
 
Equals  Determines whether the specified object is equal to the current object. (Inherited from Object.)  
GetHashCode  Serves as the default hash function. (Inherited from Object.)  
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 Solve(Decimal)
methods.
 
GetType  Gets the Type of the current instance. (Inherited from Object.)  
Inverse 
Solves a set of equation systems of type A * X = I.
 
Reverse 
Reverses the decomposition, reconstructing the original matrix X.
 
Solve(Decimal) 
Solves a set of equation systems of type A * X = B.
 
Solve(Decimal) 
Solves a set of equation systems of type A * X = B.
 
SolveForDiagonal 
Solves a set of equation systems of type A * X = B where B is a diagonal matrix.
 
SolveTranspose 
Solves a set of equation systems of type X * A = B.
 
ToString  Returns a string that represents the current object. (Inherited from Object.) 
Name  Description  

HasMethod 
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)  
IsEqual 
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.)  
To(Type)  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)  
ToT  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) 
For an mbyn matrix A with m >= n, the LU decomposition is an mbyn unit lower triangular matrix L, an nbyn upper triangular matrix U, and a permutation vector piv of length m so that A(piv) = L*U. If m < n, then L is mbym and U is mbyn.
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 .
If you need to compute a LU decomposition for matrices with data types other than double, see JaggedLuDecompositionF, JaggedLuDecompositionD. If you need to compute a LU decomposition for a multidimensional matrix, see LuDecomposition, LuDecompositionF, and LuDecompositionD.
// Let's say we would like to compute the // LU decomposition of the following matrix: double[][] matrix = { new double[] { 2, 1, 0 }, new double[] { 1, 2, 1 }, new double[] { 0, 1, 2 } }; // Compute the LU decomposition with: var lu = new JaggedLuDecomposition(matrix); // Retrieve the lower triangular factor L: double[][] L = lu.LowerTriangularFactor; // Should be equal to double[][] expectedL = { new double[] { 1.0000, 0, 0 }, new double[] { 0.5000, 1.0000, 0 }, new double[] { 0, 0.6667, 1.0000 }, }; // Retrieve the upper triangular factor U: double[][] U = lu.UpperTriangularFactor; // Should be equal to double[][] expectedU = { new double[] { 2.0000, 1.0000, 0 }, new double[] { 0, 1.5000, 1.0000 }, new double[] { 0, 0, 1.3333 }, }; // Certify that the decomposition has worked as expected by // trying to reconstruct the original matrix with R = L * U: double[][] reconstruction = L.Dot(U); // reconstruction should be equal to // { // { 2, 1, 0 }, // { 1, 2, 1 }, // { 0, 1, 2 } // };