DecompositionOperations<TReal, TComplex>.LUSolve Method

Definition

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

Overload List

LUSolve(TransposeOperation, Int32, Int32, Array2D<TReal>, Array1D<Int32>, Array2D<TReal>, Int32) Solves a system of linear equations with a general N-by-N matrix A using the LU decomposition computed by LUDecompose(Int32, Int32, Array2D<TReal>, Array1D<Int32>, Int32).
LUSolve(TransposeOperation, Int32, Int32, Array2D<TComplex>, Array1D<Int32>, Array2D<TComplex>, Int32) ZGETRS solves a system of linear equations A * X = B or A' * X = B with a general N-by-N matrix A using the LU decomposition computed by ZGETRF. Arguments ========= TRANS (input) CHARACTER*1 Specifies the form of the system of equations: = 'N': A * X = B (No transpose) = TransposeOperation.Transpose: A'* X = B (Transpose) = 'C': A'* X = B (Conjugate transpose = Transpose) N (input) INTEGER The elementOrder of the matrix A. N >= 0. NRHS (input) INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0. A (input) ZOUBLE PRECISION array, dimension (LDA,N) The factors L and U from the decomposition A = P*L*U as computed by ZGETRF. LDA (input) INTEGER The leading dimension of the array A. LDA >= Max(1,N). IPIV (input) INTEGER array, dimension (N) The pivot indexes from ZGETRF; for 1< =i< =N, row i of the matrix was interchanged with row IPIVi. B (input/output) ZOUBLE PRECISION array, dimension (LDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X. LDB (input) INTEGER The leading dimension of the array B. LDB >= Max(1,N). INFO (output) INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value =====================================================================

LUSolve(TransposeOperation, Int32, Int32, Array2D<TReal>, Array1D<Int32>, Array2D<TReal>, Int32)

Solves a system of linear equations with a general N-by-N matrix A using the LU decomposition computed by LUDecompose(Int32, Int32, Array2D<TReal>, Array1D<Int32>, Int32).
C#
public abstract void LUSolve(
	TransposeOperation trans,
	int n,
	int nrhs,
	Array2D<TReal> a,
	Array1D<int> ipiv,
	Array2D<TReal> b,
	out int info
)

Parameters

trans  TransposeOperation
A TransposeOperation value that specifies whether the regular or the transposed system should be solved.
n  Int32
An integer specifying the number of rows and columns of the matrix a. Must be greater than or equal to zero.
nrhs  Int32
An integer specifying the number of columns in the right-hand side matrix b. Must be greater than or equal to zero.
a  Array2D<TReal>
TReal array specifying the n-by-n matrix containing the lower and upper triangular factors as computed by LUDecompose(Int32, Int32, Array2D<TReal>, Array1D<Int32>, Int32).
ipiv  Array1D<Int32>
Integer array that contains the pivot indexes computed by LUDecompose(Int32, Int32, Array2D<TReal>, Array1D<Int32>, Int32).
b  Array2D<TReal>
TReal array specifying the nrhs-by-n matrix containing the right-hand sides. On exit, this matrix is overwritten with the solution.
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.

LUSolve(TransposeOperation, Int32, Int32, Array2D<TComplex>, Array1D<Int32>, Array2D<TComplex>, Int32)

ZGETRS solves a system of linear equations A * X = B or A' * X = B with a general N-by-N matrix A using the LU decomposition computed by ZGETRF. Arguments ========= TRANS (input) CHARACTER*1 Specifies the form of the system of equations: = 'N': A * X = B (No transpose) = TransposeOperation.Transpose: A'* X = B (Transpose) = 'C': A'* X = B (Conjugate transpose = Transpose) N (input) INTEGER The elementOrder of the matrix A. N >= 0. NRHS (input) INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0. A (input) ZOUBLE PRECISION array, dimension (LDA,N) The factors L and U from the decomposition A = P*L*U as computed by ZGETRF. LDA (input) INTEGER The leading dimension of the array A. LDA >= Max(1,N). IPIV (input) INTEGER array, dimension (N) The pivot indexes from ZGETRF; for 1< =i< =N, row i of the matrix was interchanged with row IPIVi. B (input/output) ZOUBLE PRECISION array, dimension (LDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X. LDB (input) INTEGER The leading dimension of the array B. LDB >= Max(1,N). INFO (output) INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value =====================================================================
C#
public abstract void LUSolve(
	TransposeOperation trans,
	int n,
	int nrhs,
	Array2D<TComplex> a,
	Array1D<int> ipiv,
	Array2D<TComplex> b,
	out int info
)

Parameters

trans  TransposeOperation
 
n  Int32
 
nrhs  Int32
 
a  Array2D<TComplex>
 
ipiv  Array1D<Int32>
 
b  Array2D<TComplex>
 
info  Int32
 

See Also