NAG FL Interface
f08lsf (zgbbrd)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f08lsf reduces a complex m×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 <nag.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 the names f08lsf, nagf_lapackeig_zgbbrd or its LAPACK name zgbbrd.

3 Description

f08lsf reduces a complex m×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 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,*) Complex (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 f08lsf 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,*) Complex (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 unitary 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 f08lsf is called.
Constraints:
  • if vect='Q' or 'B', ldq max(1,m) ;
  • otherwise ldq1.
13: pt(ldpt,*) Complex (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 unitary matrix PH, 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 f08lsf is called.
Constraints:
  • if vect='P' or 'B', ldpt max(1,n) ;
  • otherwise ldpt1.
15: c(ldc,*) Complex (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 QHC. 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 f08lsf is called.
Constraints:
  • if ncc>0, ldc max(1,m) ;
  • if ncc=0, ldc1.
17: work(max(m,n)) Complex (Kind=nag_wp) array Workspace
18: rwork(max(m,n)) Real (Kind=nag_wp) array Workspace
19: 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 QBPH=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 unitary matrix by a matrix F such that
F2 = O(ε) .  
A similar statement holds for the computed matrix PH.

8 Parallelism and Performance

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

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)