NAG FL Interface
f08lef (dgbbrd)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f08lef reduces a real m×n band matrix to upper bidiagonal form.

2 Specification

Fortran Interface
Subroutine f08lef ( vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, info)
Integer, Intent (In) :: m, n, ncc, kl, ku, ldab, ldq, ldpt, ldc
Integer, Intent (Out) :: info
Real (Kind=nag_wp), Intent (Inout) :: ab(ldab,*), q(ldq,*), pt(ldpt,*), c(ldc,*)
Real (Kind=nag_wp), Intent (Out) :: d(min(m,n)), e(min(m,n)-1), work(2*max(m,n))
Character (1), Intent (In) :: vect
C Header Interface
#include <nag.h>
void  f08lef_ (const char *vect, const Integer *m, const Integer *n, const Integer *ncc, const Integer *kl, const Integer *ku, double ab[], const Integer *ldab, double d[], double e[], double q[], const Integer *ldq, double pt[], const Integer *ldpt, double c[], const Integer *ldc, double work[], Integer *info, const Charlen length_vect)
The routine may be called by the names f08lef, nagf_lapackeig_dgbbrd or its LAPACK name dgbbrd.

3 Description

f08lef reduces a real m×n band matrix to upper bidiagonal form B by an orthogonal transformation: A=QBPT. The orthogonal matrices Q and PT, of order m and n respectively, are determined as a product of Givens rotation matrices, and may be formed explicitly by the routine if required. A matrix C may also be updated to give C~=QTC.
The routine uses a vectorizable form of the reduction.

4 References

None.

5 Arguments

1: vect Character(1) Input
On entry: indicates whether the matrices Q and/or PT are generated.
vect='N'
Neither Q nor PT is generated.
vect='Q'
Q is generated.
vect='P'
PT is generated.
vect='B'
Both Q and PT are generated.
Constraint: vect='N', 'Q', 'P' or 'B'.
2: m Integer Input
On entry: m, the number of rows of the matrix A.
Constraint: m0.
3: n Integer Input
On entry: n, the number of columns of the matrix A.
Constraint: n0.
4: ncc Integer Input
On entry: nC, the number of columns of the matrix C.
Constraint: ncc0.
5: kl Integer Input
On entry: the number of subdiagonals, kl, within the band of A.
Constraint: kl0.
6: ku Integer Input
On entry: the number of superdiagonals, ku, within the band of A.
Constraint: ku0.
7: ab(ldab,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array ab must be at least max(1,n).
On entry: the original m×n band matrix A.
The matrix is stored in rows 1 to kl+ku+1, more precisely, the element Aij must be stored in
ab(ku+1+i-j,j)  for ​max(1,j-ku)imin(m,j+kl). 
On exit: ab is overwritten by values generated during the reduction.
8: ldab Integer Input
On entry: the first dimension of the array ab as declared in the (sub)program from which f08lef is called.
Constraint: ldabkl+ku+1.
9: d(min(m,n)) Real (Kind=nag_wp) array Output
On exit: the diagonal elements of the bidiagonal matrix B.
10: e(min(m,n)-1) Real (Kind=nag_wp) array Output
On exit: the superdiagonal elements of the bidiagonal matrix B.
11: q(ldq,*) Real (Kind=nag_wp) array Output
Note: the second dimension of the array q must be at least max(1,m) if vect='Q' or 'B', and at least 1 otherwise.
On exit: if vect='Q' or 'B', contains the m×m orthogonal matrix Q.
If vect='N' or 'P', q is not referenced.
12: ldq Integer Input
On entry: the first dimension of the array q as declared in the (sub)program from which f08lef is called.
Constraints:
  • if vect='Q' or 'B', ldq max(1,m) ;
  • otherwise ldq1.
13: pt(ldpt,*) Real (Kind=nag_wp) array Output
Note: the second dimension of the array pt must be at least max(1,n) if vect='P' or 'B', and at least 1 otherwise.
On exit: the n×n orthogonal matrix PT, if vect='P' or 'B'. If vect='N' or 'Q', pt is not referenced.
14: ldpt Integer Input
On entry: the first dimension of the array pt as declared in the (sub)program from which f08lef is called.
Constraints:
  • if vect='P' or 'B', ldpt max(1,n) ;
  • otherwise ldpt1.
15: c(ldc,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array c must be at least max(1,ncc).
On entry: an m×nC matrix C.
On exit: c is overwritten by QTC. If ncc=0, c is not referenced.
16: ldc Integer Input
On entry: the first dimension of the array c as declared in the (sub)program from which f08lef is called.
Constraints:
  • if ncc>0, ldc max(1,m) ;
  • if ncc=0, ldc1.
17: work(2×max(m,n)) Real (Kind=nag_wp) array Workspace
18: info Integer Output
On exit: info=0 unless the routine detects an error (see Section 6).

6 Error Indicators and Warnings

info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

7 Accuracy

The computed bidiagonal form B satisfies QBPT=A+E, where
E2 c (n) ε A2 ,  
c(n) is a modestly increasing function of n, and ε is the machine precision.
The elements of B themselves may be sensitive to small perturbations in A or to rounding errors in the computation, but this does not affect the stability of the singular values and vectors.
The computed matrix Q differs from an exactly orthogonal matrix by a matrix F such that
F2 = O(ε) .  
A similar statement holds for the computed matrix PT.

8 Parallelism and Performance

f08lef makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

The total number of real floating-point operations is approximately the sum of: where k=kl+ku, assuming nk. For this section we assume that m=n.
The complex analogue of this routine is f08lsf.

10 Example

This example reduces the matrix A to upper bidiagonal form, where
A = ( -0.57 -1.28 0.00 0.00 -1.93 1.08 -0.31 0.00 2.30 0.24 0.40 -0.35 0.00 0.64 -0.66 0.08 0.00 0.00 0.15 -2.13 -0.00 0.00 0.00 0.50 ) .  

10.1 Program Text

Program Text (f08lefe.f90)

10.2 Program Data

Program Data (f08lefe.d)

10.3 Program Results

Program Results (f08lefe.r)