lagtf#

Functions

void slagtf(
    const INT           n,
          f32* restrict A,
    const f32           lambda,
          f32* restrict B,
          f32* restrict C,
    const f32           tol,
          f32* restrict D,
          INT* restrict in,
          INT*          info
);
void slagtf(const INT n, f32 *restrict A, const f32 lambda, f32 *restrict B, f32 *restrict C, const f32 tol, f32 *restrict D, INT *restrict in, INT *info)#

SLAGTF factorizes the matrix (T - lambda*I), where T is an n by n tridiagonal matrix and lambda is a scalar, as.

T - lambda*I = P*L*U,

where P is a permutation matrix, L is a unit lower tridiagonal matrix with at most one non-zero sub-diagonal elements per column and U is an upper triangular matrix with at most two non-zero super-diagonal elements per column.

The factorization is obtained by Gaussian elimination with partial pivoting and implicit row scaling.

The parameter LAMBDA is included in the routine so that SLAGTF may be used, in conjunction with SLAGTS, to obtain eigenvectors of T by inverse iteration.

Parameters

in
n

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

inout
A

Single precision array, dimension (n). On entry, the diagonal elements of T. On exit, the n diagonal elements of U.

in
lambda

The scalar lambda.

inout
B

Single precision array, dimension (n-1). On entry, the (n-1) super-diagonal elements of T. On exit, the (n-1) super-diagonal elements of U.

inout
C

Single precision array, dimension (n-1). On entry, the (n-1) sub-diagonal elements of T. On exit, the (n-1) sub-diagonal elements of L.

in
tol

A relative tolerance used to indicate whether or not the matrix (T - lambda*I) is nearly singular. If tol is supplied as less than eps, where eps is the relative machine precision, then eps is used in place of tol.

out
D

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

out
in

Integer array, dimension (n). On exit, contains details of the permutation matrix P. If an interchange occurred at the k-th step of the elimination, then in[k] = 1, otherwise in[k] = 0, for 0 <= k < n-1. The element in[n-1] returns the smallest 0-based index j such that |u(j,j)| <= norm((T - lambda*I)(j)) * tol, where norm(A(j)) denotes the sum of absolute values of the j-th row of A. If no such j exists then in[n-1] is returned as -1.

out
info

  • = 0: successful exit

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

Functions

void dlagtf(
    const INT           n,
          f64* restrict A,
    const f64           lambda,
          f64* restrict B,
          f64* restrict C,
    const f64           tol,
          f64* restrict D,
          INT* restrict in,
          INT*          info
);
void dlagtf(const INT n, f64 *restrict A, const f64 lambda, f64 *restrict B, f64 *restrict C, const f64 tol, f64 *restrict D, INT *restrict in, INT *info)#

DLAGTF factorizes the matrix (T - lambda*I), where T is an n by n tridiagonal matrix and lambda is a scalar, as.

T - lambda*I = P*L*U,

where P is a permutation matrix, L is a unit lower tridiagonal matrix with at most one non-zero sub-diagonal elements per column and U is an upper triangular matrix with at most two non-zero super-diagonal elements per column.

The factorization is obtained by Gaussian elimination with partial pivoting and implicit row scaling.

The parameter LAMBDA is included in the routine so that DLAGTF may be used, in conjunction with DLAGTS, to obtain eigenvectors of T by inverse iteration.

Parameters

in
n

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

inout
A

Double precision array, dimension (n). On entry, the diagonal elements of T. On exit, the n diagonal elements of U.

in
lambda

The scalar lambda.

inout
B

Double precision array, dimension (n-1). On entry, the (n-1) super-diagonal elements of T. On exit, the (n-1) super-diagonal elements of U.

inout
C

Double precision array, dimension (n-1). On entry, the (n-1) sub-diagonal elements of T. On exit, the (n-1) sub-diagonal elements of L.

in
tol

A relative tolerance used to indicate whether or not the matrix (T - lambda*I) is nearly singular. If tol is supplied as less than eps, where eps is the relative machine precision, then eps is used in place of tol.

out
D

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

out
in

Integer array, dimension (n). On exit, contains details of the permutation matrix P. If an interchange occurred at the k-th step of the elimination, then in[k] = 1, otherwise in[k] = 0, for 0 <= k < n-1. The element in[n-1] returns the smallest 0-based index j such that |u(j,j)| <= norm((T - lambda*I)(j)) * tol, where norm(A(j)) denotes the sum of absolute values of the j-th row of A. If no such j exists then in[n-1] is returned as -1.

out
info

  • = 0: successful exit

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