NAG FL Interface
f08bcf (dtpmqrt)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

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

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 <nag.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 the names f08bcf, nagf_lapackeig_dtpmqrt or its LAPACK name dtpmqrt.

3 Description

f08bcf is intended to be used after a call to f08bbf 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×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×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 f08bbf); the number of columns of V is nv (i.e., n as passed to f08bbf).
If Q is being applied from the right (CQ or CQT) 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 f08bbf.

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 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 f08bbf. This must be the same value used in the previous call to f08bbf (see l in f08bbf).
Constraint: 0lk.
7: nb Integer Input
On entry: nb, the blocking factor used in a previous call to f08bbf 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,*) Real (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 f08bbf.
9: ldv Integer Input
On entry: the first dimension of the array v as declared in the (sub)program from which f08bcf is called.
Constraints:
  • if side='L', ldv max(1,m) ;
  • if side='R', ldv max(1,n) .
10: t(ldt,*) Real (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 f08bbf (see t in f08bbf).
11: ldt Integer Input
On entry: the first dimension of the array t as declared in the (sub)program from which f08bcf is called.
Constraint: ldtnb.
12: c1(ldc1,*) Real (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 QTC or CQ or CQT.
13: ldc1 Integer Input
On entry: the first dimension of the array c1 as declared in the (sub)program from which f08bcf is called.
Constraints:
  • if side='L', ldc1 max(1,k) ;
  • if side='R', ldc1 max(1,m) .
14: c2(ldc2,*) Real (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 QTC or CQ or CQT.
15: ldc2 Integer Input
On entry: the first dimension of the array c2 as declared in the (sub)program from which f08bcf is called.
Constraint: ldc2 max(1,m) .
16: work(*) Real (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

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

10 Example

See f08bbf.