?gttrf
?gttrf
Computes the LU factorization of a tridiagonal matrix.
Syntax
lapack_int
LAPACKE_sgttrf
(
lapack_int
n
,
float
*
dl
,
float
*
d
,
float
*
du
,
float
*
du2
,
lapack_int
*
ipiv
);
lapack_int
LAPACKE_dgttrf
(
lapack_int
n
,
double
*
dl
,
double
*
d
,
double
*
du
,
double
*
du2
,
lapack_int
*
ipiv
);
lapack_int
LAPACKE_cgttrf
(
lapack_int
n
,
lapack_complex_float
*
dl
,
lapack_complex_float
*
d
,
lapack_complex_float
*
du
,
lapack_complex_float
*
du2
,
lapack_int
*
ipiv
);
lapack_int
LAPACKE_zgttrf
(
lapack_int
n
,
lapack_complex_double
*
dl
,
lapack_complex_double
*
d
,
lapack_complex_double
*
du
,
lapack_complex_double
*
du2
,
lapack_int
*
ipiv
);
Include Files
- mkl.h
Description
The routine computes the
LU
factorization of a real or complex tridiagonal matrix A
using elimination with partial pivoting and row interchanges.The factorization has the form
A = L*U,
where
L
is a product of permutation and unit lower bidiagonal matrices and U
is upper triangular with nonzeroes in only the main diagonal and first two superdiagonals.Input Parameters
- n
- The order of the matrixA;n≥0.
- dl,d,du
- Arrays containing elements ofA.The arraydlof dimension(contains the subdiagonal elements ofn- 1)A.The arraydof dimensionncontains the diagonal elements ofA.The arrayduof dimension(contains the superdiagonal elements ofn- 1)A.
Output Parameters
- dl
- Overwritten by the(multipliers that define the matrixn-1)Lfrom theLUfactorization ofA.
- d
- Overwritten by thendiagonal elements of the upper triangular matrixUfrom theLUfactorization ofA.
- du
- Overwritten by the(elements of the first superdiagonal ofn-1)U.
- du2
- Array, dimension(. On exit,n-2)du2contains(elements of the second superdiagonal ofn-2)U.
- ipiv
- Array, dimension (n). The pivot indices: for 1 ≤i≤n, rowiwas interchanged with rowipiv[i-1].ipiv[i-1] is alwaysiori+1;ipiv[i-1] =iindicates a row interchange was not required.
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , parameter
info
= -i
i
had an illegal value. If is 0. The factorization has been completed, but
info
= i
, u
i
i
U
is exactly singular. Division by zero will occur if you use the factor U
for solving a system of linear equations.