Reduces a real symmetric band matrix to tridiagonal form.
FORTRAN 77:
call ssbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
call dsbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
FORTRAN 95:
call sbtrd(ab[, q] [,vect] [,uplo] [,info])
C:
lapack_int LAPACKE_<?>sbtrd( int matrix_order, char vect, char uplo, lapack_int n, lapack_int kd, <datatype>* ab, lapack_int ldab, <datatype>* d, <datatype>* e, <datatype>* q, lapack_int ldq );
The routine reduces a real symmetric band matrix A to symmetric tridiagonal form T by an orthogonal similarity transformation: A = Q*T*QT. The orthogonal matrix Q is determined as a product of Givens rotations.
If required, the routine can also form the matrix Q explicitly.
The data types are given for the Fortran interface. A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type definitions.
CHARACTER*1. Must be 'V' or 'N'.
If vect = 'V', the routine returns the explicit matrix Q.
If vect = 'N', the routine does not return Q.
CHARACTER*1. Must be 'U' or 'L'.
If uplo = 'U', ab stores the upper triangular part of A.
If uplo = 'L', ab stores the lower triangular part of A.
INTEGER. The order of the matrix A (n≥0).
INTEGER. The number of super- or sub-diagonals in A
(kd≥0).
REAL for ssbtrd
DOUBLE PRECISION for dsbtrd.
ab (ldab,*) is an array containing either upper or lower triangular part of the matrix A (as specified by uplo) in band storage format.
The second dimension of ab must be at least max(1, n).
q (ldq,*) is an array.
If vect = 'U', the q array must contain an n-by-n matrix X.
If vect = 'N' or 'V', the q parameter need not be set.
The second dimension of q must be at least max(1, n).
work(*) is a workspace array.
The dimension of work must be at least max(1, n).
INTEGER. The leading dimension of ab; at least kd+1.
INTEGER. The leading dimension of q. Constraints:
ldq ≥ max(1, n) if vect = 'V';
ldq ≥ 1 if vect = 'N'.
On exit, the diagonal elements of the array ab are overwritten by the diagonal elements of the tridiagonal matrix T. If kd > 0, the elements on the first superdiagonal (if uplo = 'U') or the first subdiagonal (if uplo = 'L') are ovewritten by the off-diagonal elements of T. The rest of ab is overwritten by values generated during the reduction.
REAL for ssbtrd
DOUBLE PRECISION for dsbtrd.
Arrays:
d(*) contains the diagonal elements of the matrix T.
The dimension of d must be at least max(1, n).
e(*) contains the off-diagonal elements of T.
The dimension of e must be at least max(1, n-1).
q(ldq,*) is not referenced if vect = 'N'.
If vect = 'V', q contains the n-by-n matrix Q.
The second dimension of q must be:
at least max(1, n) if vect = 'V';
at least 1 if vect = 'N'.
INTEGER.
If info = 0, the execution is successful.
If info = -i, the i-th parameter had an illegal value.
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or restorable arguments, see Fortran 95 Interface Conventions.
Specific details for the routine sbtrd interface are the following:
Holds the array A of size (kd+1,n).
Holds the matrix Q of size (n,n).
Must be 'U' or 'L'. The default value is 'U'.
If omitted, this argument is restored based on the presence of argument q as follows: vect = 'V', if q is present, vect = 'N', if q is omitted.
If present, vect must be equal to 'V' or 'U' and the argument q must also be present. Note that there will be an error condition if vect is present and q omitted.
Note that diagonal (d) and off-diagonal (e) elements of the matrix T are omitted because they are kept in the matrix A on exit.
The computed matrix T is exactly similar to a matrix A+E, where ||E||2 = c(n)*ε*||A||2, c(n) is a modestly increasing function of n, and ε is the machine precision. The computed matrix Q differs from an exactly orthogonal matrix by a matrix E such that ||E||2 = O(ε).
The total number of floating-point operations is approximately 6n2*kd if vect = 'N', with 3n3*(kd-1)/kd additional operations if vect = 'V'.
The complex counterpart of this routine is hbtrd.