NAG Library Routine Document

f08bcf (dtpmqrt)

1
Purpose

f08bcf (dtpmqrt) multiplies an arbitrary real matrix C by the real orthogonal matrix Q from a QR factorization computed by f08bbf (dtpqrt).

2
Specification

Fortran Interface
Subroutine f08bcf ( 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
Real (Kind=nag_wp), Intent (In):: v(ldv,*), t(ldt,*)
Real (Kind=nag_wp), Intent (Inout):: c1(ldc1,*), c2(ldc2,*), work(*)
Character (1), Intent (In):: side, trans
C Header Interface
#include <nagmk26.h>
void  f08bcf_ (const char *side, const char *trans, const Integer *m, const Integer *n, const Integer *k, const Integer *l, const Integer *nb, const double v[], const Integer *ldv, const double t[], const Integer *ldt, double c1[], const Integer *ldc1, double c2[], const Integer *ldc2, double work[], Integer *info, const Charlen length_side, const Charlen length_trans)
The routine may be called by its LAPACK name dtpmqrt.

3
Description

f08bcf (dtpmqrt) is intended to be used after a call to f08bbf (dtpqrt) which performs a QR factorization of a triangular-pentagonal matrix containing an upper triangular matrix A over a pentagonal matrix B. The orthogonal matrix Q is represented as a product of elementary reflectors.
This routine may be used to form the matrix products
QC , QTC , CQ ​ or ​ CQT ,  
where the real rectangular mc by nc matrix C is split into component matrices C1 and C2.
If Q is being applied from the left (QC or QTC) 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 f08bbf (dtpqrt)); the number of columns of V is nv (i.e., n as passed to f08bbf (dtpqrt)).
If Q is being applied from the right (CQ or CQT) 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 f08bbf (dtpqrt).

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 QT is to be applied to C.
side='L'
Q or QT is applied to C from the left.
side='R'
Q or QT is applied to C from the right.
Constraint: side='L' or 'R'.
2:     trans – Character(1)Input
On entry: indicates whether Q or QT is to be applied to C.
trans='N'
Q is applied to C.
trans='T'
QT is applied to C.
Constraint: trans='N' or 'T'.
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 f08bbf (dtpqrt). This must be the same value used in the previous call to f08bbf (dtpqrt) (see l in f08bbf (dtpqrt)).
Constraint: 0lk.
7:     nb – IntegerInput
On entry: nb, the blocking factor used in a previous call to f08bbf (dtpqrt) to compute the QR factorization of a triangular-pentagonal matrix containing composite matrices A and B.
Constraints:
  • nb1;
  • if k>0, nbk.
8:     vldv* – Real (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 f08bbf (dtpqrt).
9:     ldv – IntegerInput
On entry: the first dimension of the array v as declared in the (sub)program from which f08bcf (dtpmqrt) is called.
Constraints:
  • if side='L', ldv max1,m ;
  • if side='R', ldv max1,n .
10:   tldt* – Real (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 f08bbf (dtpqrt) (see t in f08bbf (dtpqrt)).
11:   ldt – IntegerInput
On entry: the first dimension of the array t as declared in the (sub)program from which f08bcf (dtpmqrt) is called.
Constraint: ldtnb.
12:   c1ldc1* – Real (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 QTC or CQ or CQT.
13:   ldc1 – IntegerInput
On entry: the first dimension of the array c1 as declared in the (sub)program from which f08bcf (dtpmqrt) is called.
Constraints:
  • if side='L', ldc1 max1,k ;
  • if side='R', ldc1 max1,m .
14:   c2ldc2* – Real (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 QTC or CQ or CQT.
15:   ldc2 – IntegerInput
On entry: the first dimension of the array c2 as declared in the (sub)program from which f08bcf (dtpmqrt) is called.
Constraint: ldc2 max1,m .
16:   work* – Real (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

f08bcf (dtpmqrt) 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 complex analogue of this routine is f08bqf (ztpmqrt).

10
Example

See Section 10 in f08bbf (dtpqrt).