NAG Library Routine Document

f08bqf (ztpmqrt)

1
Purpose

f08bqf (ztpmqrt) multiplies an arbitrary complex matrix C by the complex unitary matrix Q from a QR factorization computed by f08bpf (ztpqrt).

2
Specification

Fortran Interface
Subroutine f08bqf ( side, trans, m, n, k, l, nb, v, ldv, t, ldt, c1, ldc1, c2, ldc2, work, info)
Integer, Intent (In):: m, n, k, l, nb, ldv, ldt, ldc1, ldc2
Integer, Intent (Out):: info
Complex (Kind=nag_wp), Intent (In):: v(ldv,*), t(ldt,*)
Complex (Kind=nag_wp), Intent (Inout):: c1(ldc1,*), c2(ldc2,*), work(*)
Character (1), Intent (In):: side, trans
C Header Interface
#include <nagmk26.h>
void  f08bqf_ (const char *side, const char *trans, const Integer *m, const Integer *n, const Integer *k, const Integer *l, const Integer *nb, const Complex v[], const Integer *ldv, const Complex t[], const Integer *ldt, Complex c1[], const Integer *ldc1, Complex c2[], const Integer *ldc2, Complex work[], Integer *info, const Charlen length_side, const Charlen length_trans)
The routine may be called by its LAPACK name ztpmqrt.

3
Description

f08bqf (ztpmqrt) is intended to be used after a call to f08bpf (ztpqrt) which performs a QR factorization of a triangular-pentagonal matrix containing an upper triangular matrix A over a pentagonal matrix B. The unitary matrix Q is represented as a product of elementary reflectors.
This routine may be used to form the matrix products
QC , QHC , CQ ​ or ​ CQH ,  
where the complex rectangular mc by nc matrix C is split into component matrices C1 and C2.
If Q is being applied from the left (QC or QHC) then
C = C1 C2  
where C1 is k by nc, C2 is mv by nc, mc=k+mv is fixed and mv is the number of rows of the matrix V containing the elementary reflectors (i.e., m as passed to f08bpf (ztpqrt)); the number of columns of V is nv (i.e., n as passed to f08bpf (ztpqrt)).
If Q is being applied from the right (CQ or CQH) then
C = C1 C2  
where C1 is mc by k, and C2 is mc by mv and nc=k+mv is fixed.
The matrices C1 and C2 are overwriten by the result of the matrix product.
A common application of this routine is in updating the solution of a linear least squares problem as illustrated in Section 10 in f08bpf (ztpqrt).

4
References

Golub G H and Van Loan C F (2012) Matrix Computations (4th Edition) Johns Hopkins University Press, Baltimore

5
Arguments

1:     side – Character(1)Input
On entry: indicates how Q or QH is to be applied to C.
side='L'
Q or QH is applied to C from the left.
side='R'
Q or QH is applied to C from the right.
Constraint: side='L' or 'R'.
2:     trans – Character(1)Input
On entry: indicates whether Q or QH is to be applied to C.
trans='N'
Q is applied to C.
trans='C'
QH is applied to C.
Constraint: trans='N' or 'C'.
3:     m – IntegerInput
On entry: the number of rows of the matrix C2, that is,
if side='L'
then mv, the number of rows of the matrix V;
if side='R'
then mc, the number of rows of the matrix C.
Constraint: m0.
4:     n – IntegerInput
On entry: the number of columns of the matrix C2, that is,
if side='L'
then nc, the number of columns of the matrix C;
if side='R'
then nv, the number of columns of the matrix V.
Constraint: n0.
5:     k – IntegerInput
On entry: k, the number of elementary reflectors whose product defines the matrix Q.
Constraint: k0.
6:     l – IntegerInput
On entry: l, the number of rows of the upper trapezoidal part of the pentagonal composite matrix V, passed (as b) in a previous call to f08bpf (ztpqrt). This must be the same value used in the previous call to f08bpf (ztpqrt) (see l in f08bpf (ztpqrt)).
Constraint: 0lk.
7:     nb – IntegerInput
On entry: nb, the blocking factor used in a previous call to f08bpf (ztpqrt) to compute the QR factorization of a triangular-pentagonal matrix containing composite matrices A and B.
Constraints:
  • nb1;
  • if k>0, nbk.
8:     vldv* – Complex (Kind=nag_wp) arrayInput
Note: the second dimension of the array v must be at least max1,k.
On entry: the mv by nv matrix V; this should remain unchanged from the array b returned by a previous call to f08bpf (ztpqrt).
9:     ldv – IntegerInput
On entry: the first dimension of the array v as declared in the (sub)program from which f08bqf (ztpmqrt) is called.
Constraints:
  • if side='L', ldv max1,m ;
  • if side='R', ldv max1,n .
10:   tldt* – Complex (Kind=nag_wp) arrayInput
Note: the second dimension of the array t must be at least max1,k.
On entry: this must remain unchanged from a previous call to f08bpf (ztpqrt) (see t in f08bpf (ztpqrt)).
11:   ldt – IntegerInput
On entry: the first dimension of the array t as declared in the (sub)program from which f08bqf (ztpmqrt) is called.
Constraint: ldtnb.
12:   c1ldc1* – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array c1 must be at least max1,n if side='L' and at least max1,k if side='R'.
On entry: C1, the first part of the composite matrix C:
if side='L'
then c1 contains the first k rows of C;
if side='R'
then c1 contains the first k columns of C.
On exit: c1 is overwritten by the corresponding block of QC or QHC or CQ or CQH.
13:   ldc1 – IntegerInput
On entry: the first dimension of the array c1 as declared in the (sub)program from which f08bqf (ztpmqrt) is called.
Constraints:
  • if side='L', ldc1 max1,k ;
  • if side='R', ldc1 max1,m .
14:   c2ldc2* – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array c2 must be at least max1,n.
On entry: C2, the second part of the composite matrix C.
if side='L'
then c2 contains the remaining mv rows of C;
if side='R'
then c2 contains the remaining mv columns of C;
On exit: c2 is overwritten by the corresponding block of QC or QHC or CQ or CQH.
15:   ldc2 – IntegerInput
On entry: the first dimension of the array c2 as declared in the (sub)program from which f08bqf (ztpmqrt) is called.
Constraint: ldc2 max1,m .
16:   work* – Complex (Kind=nag_wp) arrayWorkspace
Note: the dimension of the array work must be at least n×nb if side='L' and at least m×nb if side='R'.
17:   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 result differs from the exact result by a matrix E such that
E2 = Oε C2 ,  
where ε is the machine precision.

8
Parallelism and Performance

f08bqf (ztpmqrt) 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 floating-point operations is approximately 2nk 2m-k  if side='L' and 2mk 2n-k  if side='R'.
The real analogue of this routine is f08bcf (dtpmqrt).

10
Example

See Section 10 in f08bpf (ztpqrt).