GenericDecompositionOperations<T>.LUDecompose Method

Definition

Namespace: Extreme.Mathematics.LinearAlgebra.Implementation
Assembly: Extreme.Numerics.Generic (in Extreme.Numerics.Generic.dll) Version: 8.1.4

Overload List

LUDecompose(Int32, Int32, Array2D<T>, Array1D<Int32>, Int32)

Computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges.

LUDecompose(Int32, Int32, Array2D<Complex<T>>, Array1D<Int32>, Int32) ZGETRF computes an LU decomposition of a general M-by-N matrix A using partial pivoting with row interchanges.

The decomposition has the form

A = P * L * U

where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

This is the right-looking Level 3 BLAS version of the algorithm.

LUDecompose(Int32, Int32, Array2D<T>, Array1D<Int32>, Int32)

Computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges.

C#
public override void LUDecompose(
	int m,
	int n,
	Array2D<T> a,
	Array1D<int> ipiv,
	out int info
)

Parameters

m  Int32
            The number of rows of the matrix A.  M >= 0.
            
n  Int32
            The number of columns of the matrix A.  N >= 0.
            
a  Array2D<T>
            Dimension (LDA,N)
            On entry, the M-by-N matrix to be factored.
            On exit, the factors L and U from the factorization
            A = P*L*U; the unit diagonal elements of L are not stored.
            
            The leading dimension of the array A.  LDA >= max(1,M).
            
ipiv  Array1D<Int32>
            Dimension (min(M,N))
            The pivot indices; for 1 <= i <= min(M,N), row i of the
            matrix was interchanged with row IPIV(i).
            
info  Int32
info is INTEGER
            = 0:  successful exit
            < 0:  if info = -i, the i-th argument had an illegal value
            > 0:  if info = i, U(i,i) is exactly zero. The factorization
                  has been completed, but the factor U is exactly
                  singular, and division by zero will occur if it is used
                  to solve a system of equations.
            

Remarks

            The factorization has the form
               A = P * L * U
            where P is a permutation matrix, L is lower triangular with unit
            diagonal elements (lower trapezoidal if m > n), and U is upper
            triangular (upper trapezoidal if m < n).
            This is the right-looking Level 3 BLAS version of the algorithm.
            

This method corresponds to the LAPACK routine DGETRF.

LUDecompose(Int32, Int32, Array2D<Complex<T>>, Array1D<Int32>, Int32)

ZGETRF computes an LU decomposition of a general M-by-N matrix A using partial pivoting with row interchanges.

The decomposition has the form

A = P * L * U

where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

This is the right-looking Level 3 BLAS version of the algorithm.

C#
public override void LUDecompose(
	int m,
	int n,
	Array2D<Complex<T>> a,
	Array1D<int> ipiv,
	out int info
)

Parameters

m  Int32
An integer specifying the number of rows of the matrix a. Must be greater than or equal to zero.
n  Int32
An integer specifying the number of columns of the matrix a. Must be greater than or equal to zero.
a  Array2D<Complex<T>>
complex T-precision array specifying the m-by-n matrix to be factored. On exit, the factors L and U from the decomposition A = P*L*U; the unit diagonal elements of L are not stored.
ipiv  Array1D<Int32>
Integer array of length min(m,n) that will hold the pivot indexes. Row i of the matrix was interchanged with row ipiv[i].
info  Int32
Reference to an integer containing a result code. Zero indicates success. Greater than zero indicates U(i,i) is exactly zero. The decomposition has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.

See Also