NAG FL Interface
f08bqf (ztpmqrt)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

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

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 <nag.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 the names f08bqf, nagf_lapackeig_ztpmqrt or its LAPACK name ztpmqrt.

3 Description

f08bqf is intended to be used after a call to f08bpf 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×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×nc, C2 is mv×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); the number of columns of V is nv (i.e., n as passed to f08bpf).
If Q is being applied from the right (CQ or CQH) then
C = ( C1 C2 )  
where C1 is mc×k, and C2 is mc×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.

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 Integer Input
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 Integer Input
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 Integer Input
On entry: k, the number of elementary reflectors whose product defines the matrix Q.
Constraint: k0.
6: l Integer Input
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. This must be the same value used in the previous call to f08bpf (see l in f08bpf).
Constraint: 0lk.
7: nb Integer Input
On entry: nb, the blocking factor used in a previous call to f08bpf to compute the QR factorization of a triangular-pentagonal matrix containing composite matrices A and B.
Constraints:
  • nb1;
  • if k>0, nbk.
8: v(ldv,*) Complex (Kind=nag_wp) array Input
Note: the second dimension of the array v must be at least max(1,k).
On entry: the mv×nv matrix V; this should remain unchanged from the array b returned by a previous call to f08bpf.
9: ldv Integer Input
On entry: the first dimension of the array v as declared in the (sub)program from which f08bqf is called.
Constraints:
  • if side='L', ldv max(1,m) ;
  • if side='R', ldv max(1,n) .
10: t(ldt,*) Complex (Kind=nag_wp) array Input
Note: the second dimension of the array t must be at least max(1,k).
On entry: this must remain unchanged from a previous call to f08bpf (see t in f08bpf).
11: ldt Integer Input
On entry: the first dimension of the array t as declared in the (sub)program from which f08bqf is called.
Constraint: ldtnb.
12: c1(ldc1,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array c1 must be at least max(1,n) if side='L' and at least max(1,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 Integer Input
On entry: the first dimension of the array c1 as declared in the (sub)program from which f08bqf is called.
Constraints:
  • if side='L', ldc1 max(1,k) ;
  • if side='R', ldc1 max(1,m) .
14: c2(ldc2,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array c2 must be at least max(1,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 Integer Input
On entry: the first dimension of the array c2 as declared in the (sub)program from which f08bqf is called.
Constraint: ldc2 max(1,m) .
16: work(*) Complex (Kind=nag_wp) array Workspace
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 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 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 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.

10 Example

See f08bpf.