F08LSF (ZGBBRD) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08LSF (ZGBBRD)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

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

2  Specification

SUBROUTINE F08LSF ( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q, LDQ, PT, LDPT, C, LDC, WORK, RWORK, INFO)
INTEGER  M, N, NCC, KL, KU, LDAB, LDQ, LDPT, LDC, INFO
REAL (KIND=nag_wp)  D(min(M,N)), E(min(M,N)-1), RWORK(max(M,N))
COMPLEX (KIND=nag_wp)  AB(LDAB,*), Q(LDQ,*), PT(LDPT,*), C(LDC,*), WORK(max(M,N))
CHARACTER(1)  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  Parameters

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:     AB(LDAB,*) – 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:     D(minM,N) – REAL (KIND=nag_wp) arrayOutput
On exit: the diagonal elements of the bidiagonal matrix B.
10:   E(minM,N-1) – REAL (KIND=nag_wp) arrayOutput
On exit: the superdiagonal elements of the bidiagonal matrix B.
11:   Q(LDQ,*) – 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:   PT(LDPT,*) – 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:   C(LDC,*) – 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:   WORK(maxM,N) – COMPLEX (KIND=nag_wp) arrayWorkspace
18:   RWORK(maxM,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  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).

9  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 .

9.1  Program Text

Program Text (f08lsfe.f90)

9.2  Program Data

Program Data (f08lsfe.d)

9.3  Program Results

Program Results (f08lsfe.r)


F08LSF (ZGBBRD) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

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