NAG Library Routine Document

f08lsf (zgbbrd)

1
Purpose

f08lsf (zgbbrd) reduces a complex m by n band matrix to real upper bidiagonal form.

2
Specification

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

3
Description

f08lsf (zgbbrd) reduces a complex m by n band matrix to real upper bidiagonal form B by a unitary transformation: A=QBPH. The unitary matrices Q and PH, 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~=QHC.
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 PH are generated.
vect='N'
Neither Q nor PH is generated.
vect='Q'
Q is generated.
vect='P'
PH is generated.
vect='B'
Both Q and PH 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* – Complex (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 f08lsf (zgbbrd) 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* – Complex (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 unitary 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 f08lsf (zgbbrd) is called.
Constraints:
  • if vect='Q' or 'B', ldq max1,m ;
  • otherwise ldq1.
13:   ptldpt* – Complex (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 unitary matrix PH, 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 f08lsf (zgbbrd) is called.
Constraints:
  • if vect='P' or 'B', ldpt max1,n ;
  • otherwise ldpt1.
15:   cldc* – Complex (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 QHC. 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 f08lsf (zgbbrd) is called.
Constraints:
  • if ncc>0, ldc max1,m ;
  • if ncc=0, ldc1.
17:   workmaxm,n – Complex (Kind=nag_wp) arrayWorkspace
18:   rworkmaxm,n – Real (Kind=nag_wp) arrayWorkspace
19:   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 QBPH=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 unitary matrix by a matrix F such that
F2 = Oε .  
A similar statement holds for the computed matrix PH.

8
Parallelism and Performance

f08lsf (zgbbrd) 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 real analogue of this routine is f08lef (dgbbrd).

10
Example

This example reduces the matrix A to upper bidiagonal form, where
A = 0.96-0.81i -0.03+0.96i 0.00+0.00i 0.00+0.00i -0.98+1.98i -1.20+0.19i -0.66+0.42i 0.00+0.00i 0.62-0.46i 1.01+0.02i 0.63-0.17i -1.11+0.60i 0.00+0.00i 0.19-0.54i -0.98-0.36i 0.22-0.20i 0.00+0.00i 0.00+0.00i -0.17-0.46i 1.47+1.59i 0.00+0.00i 0.00+0.00i 0.00+0.00i 0.26+0.26i .  

10.1
Program Text

Program Text (f08lsfe.f90)

10.2
Program Data

Program Data (f08lsfe.d)

10.3
Program Results

Program Results (f08lsfe.r)