NAG Library Routine Document

f08lef  (dgbbrd)

 Contents

    1  Purpose
    7  Accuracy

1
Purpose

f08lef (dgbbrd) reduces a real m by 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 nagmk26.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 its LAPACK name dgbbrd.

3
Description

f08lef (dgbbrd) reduces a real m by 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 – IntegerInput
On entry: m, the number of rows of the matrix A.
Constraint: m0.
3:     n – IntegerInput
On entry: n, the number of columns of the matrix A.
Constraint: n0.
4:     ncc – IntegerInput
On entry: nC, the number of columns of the matrix C.
Constraint: ncc0.
5:     kl – IntegerInput
On entry: the number of subdiagonals, kl, within the band of A.
Constraint: kl0.
6:     ku – IntegerInput
On entry: the number of superdiagonals, ku, within the band of A.
Constraint: ku0.
7:     abldab* – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array ab must be at least max1,n.
On entry: the original m by n band matrix A.
The matrix is stored in rows 1 to kl+ku+1, more precisely, the element Aij must be stored in
abku+1+i-jj  for ​max1,j-kuiminm,j+kl. 
On exit: ab is overwritten by values generated during the reduction.
8:     ldab – IntegerInput
On entry: the first dimension of the array ab as declared in the (sub)program from which f08lef (dgbbrd) is called.
Constraint: ldabkl+ku+1.
9:     dminm,n – Real (Kind=nag_wp) arrayOutput
On exit: the diagonal elements of the bidiagonal matrix B.
10:   eminm,n-1 – Real (Kind=nag_wp) arrayOutput
On exit: the superdiagonal elements of the bidiagonal matrix B.
11:   qldq* – Real (Kind=nag_wp) arrayOutput
Note: the second dimension of the array q must be at least max1,m if vect='Q' or 'B', and at least 1 otherwise.
On exit: if vect='Q' or 'B', contains the m by m orthogonal matrix Q.
If vect='N' or 'P', q is not referenced.
12:   ldq – IntegerInput
On entry: the first dimension of the array q as declared in the (sub)program from which f08lef (dgbbrd) is called.
Constraints:
  • if vect='Q' or 'B', ldq max1,m ;
  • otherwise ldq1.
13:   ptldpt* – Real (Kind=nag_wp) arrayOutput
Note: the second dimension of the array pt must be at least max1,n if vect='P' or 'B', and at least 1 otherwise.
On exit: the n by n orthogonal matrix PT, if vect='P' or 'B'. If vect='N' or 'Q', pt is not referenced.
14:   ldpt – IntegerInput
On entry: the first dimension of the array pt as declared in the (sub)program from which f08lef (dgbbrd) is called.
Constraints:
  • if vect='P' or 'B', ldpt max1,n ;
  • otherwise ldpt1.
15:   cldc* – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array c must be at least max1,ncc.
On entry: an m by nC matrix C.
On exit: c is overwritten by QTC. If ncc=0, c is not referenced.
16:   ldc – IntegerInput
On entry: the first dimension of the array c as declared in the (sub)program from which f08lef (dgbbrd) is called.
Constraints:
  • if ncc>0, ldc max1,m ;
  • if ncc=0, ldc1.
17:   work2×maxm,n – Real (Kind=nag_wp) arrayWorkspace
18:   info – IntegerOutput
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 ,  
cn 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 (dgbbrd) 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 (zgbbrd).

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)

© The Numerical Algorithms Group Ltd, Oxford, UK. 2017