gttrf#

Functions

void sgttrf(
    const INT           n,
          f32* restrict DL,
          f32* restrict D,
          f32* restrict DU,
          f32* restrict DU2,
          INT* restrict ipiv,
          INT*          info
);
void sgttrf(const INT n, f32 *restrict DL, f32 *restrict D, f32 *restrict DU, f32 *restrict DU2, INT *restrict ipiv, INT *info)#

SGTTRF computes an LU factorization of a real 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 nonzeros in only the main diagonal and first two superdiagonals.

Parameters

in
n

The order of the matrix A. n >= 0.

inout
DL

On entry, the (n-1) sub-diagonal elements of A. On exit, the (n-1) multipliers that define the matrix L from the LU factorization of A. Array of dimension (n-1).

inout
D

On entry, the diagonal elements of A. On exit, the n diagonal elements of the upper triangular matrix U from the LU factorization of A. Array of dimension (n).

inout
DU

On entry, the (n-1) super-diagonal elements of A. On exit, the (n-1) elements of the first super-diagonal of U. Array of dimension (n-1).

out
DU2

On exit, the (n-2) elements of the second super-diagonal of U. Array of dimension (n-2).

out
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix was interchanged with row ipiv[i]. ipiv[i] will always be either i or i+1; ipiv[i] = i indicates a row interchange was not required. Array of dimension (n).

out
info

  • = 0: successful exit

  • < 0: if info = -k, the k-th argument had an illegal value

  • > 0: if info = k, U(k-1,k-1) is exactly zero (0-based). 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.

Functions

void dgttrf(
    const INT           n,
          f64* restrict DL,
          f64* restrict D,
          f64* restrict DU,
          f64* restrict DU2,
          INT* restrict ipiv,
          INT*          info
);
void dgttrf(const INT n, f64 *restrict DL, f64 *restrict D, f64 *restrict DU, f64 *restrict DU2, INT *restrict ipiv, INT *info)#

DGTTRF computes an LU factorization of a real 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 nonzeros in only the main diagonal and first two superdiagonals.

Parameters

in
n

The order of the matrix A. n >= 0.

inout
DL

On entry, the (n-1) sub-diagonal elements of A. On exit, the (n-1) multipliers that define the matrix L from the LU factorization of A. Array of dimension (n-1).

inout
D

On entry, the diagonal elements of A. On exit, the n diagonal elements of the upper triangular matrix U from the LU factorization of A. Array of dimension (n).

inout
DU

On entry, the (n-1) super-diagonal elements of A. On exit, the (n-1) elements of the first super-diagonal of U. Array of dimension (n-1).

out
DU2

On exit, the (n-2) elements of the second super-diagonal of U. Array of dimension (n-2).

out
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix was interchanged with row ipiv[i]. ipiv[i] will always be either i or i+1; ipiv[i] = i indicates a row interchange was not required. Array of dimension (n).

out
info

  • = 0: successful exit

  • < 0: if info = -k, the k-th argument had an illegal value

  • > 0: if info = k, U(k-1,k-1) is exactly zero (0-based). 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.

Functions

void cgttrf(
    const INT           n,
          c64* restrict DL,
          c64* restrict D,
          c64* restrict DU,
          c64* restrict DU2,
          INT* restrict ipiv,
          INT*          info
);
void cgttrf(const INT n, c64 *restrict DL, c64 *restrict D, c64 *restrict DU, c64 *restrict DU2, INT *restrict ipiv, INT *info)#

CGTTRF computes an LU factorization of a 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 nonzeros in only the main diagonal and first two superdiagonals.

Parameters

in
n

The order of the matrix A. n >= 0.

inout
DL

On entry, the (n-1) sub-diagonal elements of A. On exit, the (n-1) multipliers that define the matrix L from the LU factorization of A. Array of dimension (n-1).

inout
D

On entry, the diagonal elements of A. On exit, the n diagonal elements of the upper triangular matrix U from the LU factorization of A. Array of dimension (n).

inout
DU

On entry, the (n-1) super-diagonal elements of A. On exit, the (n-1) elements of the first super-diagonal of U. Array of dimension (n-1).

out
DU2

On exit, the (n-2) elements of the second super-diagonal of U. Array of dimension (n-2).

out
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix was interchanged with row ipiv[i]. ipiv[i] will always be either i or i+1; ipiv[i] = i indicates a row interchange was not required. Array of dimension (n).

out
info

  • = 0: successful exit

  • < 0: if info = -k, the k-th argument had an illegal value

  • > 0: if info = k, U(k-1,k-1) is exactly zero (0-based). 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.

Functions

void zgttrf(
    const INT            n,
          c128* restrict DL,
          c128* restrict D,
          c128* restrict DU,
          c128* restrict DU2,
          INT*  restrict ipiv,
          INT*           info
);
void zgttrf(const INT n, c128 *restrict DL, c128 *restrict D, c128 *restrict DU, c128 *restrict DU2, INT *restrict ipiv, INT *info)#

ZGTTRF computes an LU factorization of a 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 nonzeros in only the main diagonal and first two superdiagonals.

Parameters

in
n

The order of the matrix A. n >= 0.

inout
DL

On entry, the (n-1) sub-diagonal elements of A. On exit, the (n-1) multipliers that define the matrix L from the LU factorization of A. Array of dimension (n-1).

inout
D

On entry, the diagonal elements of A. On exit, the n diagonal elements of the upper triangular matrix U from the LU factorization of A. Array of dimension (n).

inout
DU

On entry, the (n-1) super-diagonal elements of A. On exit, the (n-1) elements of the first super-diagonal of U. Array of dimension (n-1).

out
DU2

On exit, the (n-2) elements of the second super-diagonal of U. Array of dimension (n-2).

out
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix was interchanged with row ipiv[i]. ipiv[i] will always be either i or i+1; ipiv[i] = i indicates a row interchange was not required. Array of dimension (n).

out
info

  • = 0: successful exit

  • < 0: if info = -k, the k-th argument had an illegal value

  • > 0: if info = k, U(k-1,k-1) is exactly zero (0-based). 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.