hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_lapack_dopmtr (f08gg)

Purpose

nag_lapack_dopmtr (f08gg) multiplies an arbitrary real matrix CC by the real orthogonal matrix QQ which was determined by nag_lapack_dsptrd (f08ge) when reducing a real symmetric matrix to tridiagonal form.

Syntax

[ap, c, info] = f08gg(side, uplo, trans, ap, tau, c, 'm', m, 'n', n)
[ap, c, info] = nag_lapack_dopmtr(side, uplo, trans, ap, tau, c, 'm', m, 'n', n)

Description

nag_lapack_dopmtr (f08gg) is intended to be used after a call to nag_lapack_dsptrd (f08ge), which reduces a real symmetric matrix AA to symmetric tridiagonal form TT by an orthogonal similarity transformation: A = QTQTA=QTQT. nag_lapack_dsptrd (f08ge) represents the orthogonal matrix QQ as a product of elementary reflectors.
This function may be used to form one of the matrix products
QC , QTC , CQ ​ or ​ CQT ,
QC , QTC , CQ ​ or ​ CQT ,
overwriting the result on CC (which may be any real rectangular matrix).
A common application of this function is to transform a matrix ZZ of eigenvectors of TT to the matrix QZQZ of eigenvectors of AA.

References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

Parameters

Compulsory Input Parameters

1:     side – string (length ≥ 1)
Indicates how QQ or QTQT is to be applied to CC.
side = 'L'side='L'
QQ or QTQT is applied to CC from the left.
side = 'R'side='R'
QQ or QTQT is applied to CC from the right.
Constraint: side = 'L'side='L' or 'R''R'.
2:     uplo – string (length ≥ 1)
This must be the same parameter uplo as supplied to nag_lapack_dsptrd (f08ge).
Constraint: uplo = 'U'uplo='U' or 'L''L'.
3:     trans – string (length ≥ 1)
Indicates whether QQ or QTQT is to be applied to CC.
trans = 'N'trans='N'
QQ is applied to CC.
trans = 'T'trans='T'
QTQT is applied to CC.
Constraint: trans = 'N'trans='N' or 'T''T'.
4:     ap( : :) – double array
Note: the dimension of the array ap must be at least max (1, m × (m + 1) / 2 ) max(1, m × (m+1) / 2 )  if side = 'L'side='L' and at least max (1, n × (n + 1) / 2 ) max(1, n × (n+1) / 2 )  if side = 'R'side='R'.
Details of the vectors which define the elementary reflectors, as returned by nag_lapack_dsptrd (f08ge).
5:     tau( : :) – double array
Note: the dimension of the array tau must be at least max (1,m1)max(1,m-1) if side = 'L'side='L' and at least max (1,n1)max(1,n-1) if side = 'R'side='R'.
Further details of the elementary reflectors, as returned by nag_lapack_dsptrd (f08ge).
6:     c(ldc, : :) – double array
The first dimension of the array c must be at least max (1,m)max(1,m)
The second dimension of the array must be at least max (1,n)max(1,n)
The mm by nn matrix CC.

Optional Input Parameters

1:     m – int64int32nag_int scalar
Default: The first dimension of the array c.
mm, the number of rows of the matrix CC; mm is also the order of QQ if side = 'L'side='L'.
Constraint: m0m0.
2:     n – int64int32nag_int scalar
Default: The second dimension of the array c.
nn, the number of columns of the matrix CC; nn is also the order of QQ if side = 'R'side='R'.
Constraint: n0n0.

Input Parameters Omitted from the MATLAB Interface

ldc work

Output Parameters

1:     ap( : :) – double array
Note: the dimension of the array ap must be at least max (1, m × (m + 1) / 2 ) max(1, m × (m+1) / 2 )  if side = 'L'side='L' and at least max (1, n × (n + 1) / 2 ) max(1, n × (n+1) / 2 )  if side = 'R'side='R'.
Is used as internal workspace prior to being restored and hence is unchanged.
2:     c(ldc, : :) – double array
The first dimension of the array c will be max (1,m)max(1,m)
The second dimension of the array will be max (1,n)max(1,n)
ldcmax (1,m)ldcmax(1,m).
c stores QCQC or QTCQTC or CQCQ or CQTCQT as specified by side and trans.
3:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: side, 2: uplo, 3: trans, 4: m, 5: n, 6: ap, 7: tau, 8: c, 9: ldc, 10: work, 11: info.
It is possible that info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.

Accuracy

The computed result differs from the exact result by a matrix EE such that
E2 = O(ε) C2 ,
E2 = O(ε) C2 ,
where εε is the machine precision.

Further Comments

The total number of floating point operations is approximately 2m2n2m2n if side = 'L'side='L' and 2mn22mn2 if side = 'R'side='R'.
The complex analogue of this function is nag_lapack_zupmtr (f08gu).

Example

function nag_lapack_dopmtr_example
side = 'Left';
uplo = 'L';
trans = 'No transpose';
ap = [2.07;
     -5.825753170191817;
     0.4331793442217867;
     -0.1186086299654892;
     1.474093708197552;
     2.624045178795586;
     0.8062881532775791;
     -0.6491595075457843;
     0.9162727563219193;
     -1.694934200651768];
tau = [1.664291789738249;
     1.212047324162142;
     0];
c = [0.5657591788223874, -0.2328424308031574;
     0.6869179572505918, -0.1626170961491636;
     -0.4395889372131648, -0.3017273343882724;
     0.1217449705930083, 0.9101102670229791];
[apOut, cOut, info] = nag_lapack_dopmtr(side, uplo, trans, ap, tau, c)
 

apOut =

    2.0700
   -5.8258
    0.4332
   -0.1186
    1.4741
    2.6240
    0.8063
   -0.6492
    0.9163
   -1.6949


cOut =

    0.5658   -0.2328
   -0.3478    0.7994
   -0.4740   -0.4087
    0.5781    0.3737


info =

                    0


function f08gg_example
side = 'Left';
uplo = 'L';
trans = 'No transpose';
ap = [2.07;
     -5.825753170191817;
     0.4331793442217867;
     -0.1186086299654892;
     1.474093708197552;
     2.624045178795586;
     0.8062881532775791;
     -0.6491595075457843;
     0.9162727563219193;
     -1.694934200651768];
tau = [1.664291789738249;
     1.212047324162142;
     0];
c = [0.5657591788223874, -0.2328424308031574;
     0.6869179572505918, -0.1626170961491636;
     -0.4395889372131648, -0.3017273343882724;
     0.1217449705930083, 0.9101102670229791];
[apOut, cOut, info] = f08gg(side, uplo, trans, ap, tau, c)
 

apOut =

    2.0700
   -5.8258
    0.4332
   -0.1186
    1.4741
    2.6240
    0.8063
   -0.6492
    0.9163
   -1.6949


cOut =

    0.5658   -0.2328
   -0.3478    0.7994
   -0.4740   -0.4087
    0.5781    0.3737


info =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013