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_zunmbr (f08ku)

Purpose

nag_lapack_zunmbr (f08ku) multiplies an arbitrary complex mm by nn matrix CC by one of the complex unitary matrices QQ or PP which were determined by nag_lapack_zgebrd (f08ks) when reducing a complex matrix to bidiagonal form.

Syntax

[c, info] = f08ku(vect, side, trans, k, a, tau, c, 'm', m, 'n', n)
[c, info] = nag_lapack_zunmbr(vect, side, trans, k, a, tau, c, 'm', m, 'n', n)

Description

nag_lapack_zunmbr (f08ku) is intended to be used after a call to nag_lapack_zgebrd (f08ks), which reduces a complex rectangular matrix AA to real bidiagonal form BB by a unitary transformation: A = QBPHA=QBPH. nag_lapack_zgebrd (f08ks) represents the matrices QQ and PHPH as products of elementary reflectors.
This function may be used to form one of the matrix products
QC , QHC , CQ , CQH , PC , PHC , CP ​ or ​ CPH ,
QC , QHC , CQ , CQH , PC , PHC , CP ​ or ​ CPH ,
overwriting the result on CC (which may be any complex rectangular matrix).

References

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

Parameters

Note: in the descriptions below, rr denotes the order of QQ or PHPH: if side = 'L'side='L', r = mr=m and if side = 'R'side='R', r = nr=n.

Compulsory Input Parameters

1:     vect – string (length ≥ 1)
Indicates whether QQ or QHQH or PP or PHPH is to be applied to CC.
vect = 'Q'vect='Q'
QQ or QHQH is applied to CC.
vect = 'P'vect='P'
PP or PHPH is applied to CC.
Constraint: vect = 'Q'vect='Q' or 'P''P'.
2:     side – string (length ≥ 1)
Indicates how QQ or QHQH or PP or PHPH is to be applied to CC.
side = 'L'side='L'
QQ or QHQH or PP or PHPH is applied to CC from the left.
side = 'R'side='R'
QQ or QHQH or PP or PHPH is applied to CC from the right.
Constraint: side = 'L'side='L' or 'R''R'.
3:     trans – string (length ≥ 1)
Indicates whether QQ or PP or QHQH or PHPH is to be applied to CC.
trans = 'N'trans='N'
QQ or PP is applied to CC.
trans = 'C'trans='C'
QHQH or PHPH is applied to CC.
Constraint: trans = 'N'trans='N' or 'C''C'.
4:     k – int64int32nag_int scalar
If vect = 'Q'vect='Q', the number of columns in the original matrix AA.
If vect = 'P'vect='P', the number of rows in the original matrix AA.
Constraint: k0k0.
5:     a(lda, : :) – complex array
The first dimension, lda, of the array a must satisfy
  • if vect = 'Q'vect='Q', lda max (1,r) lda max(1,r) ;
  • if vect = 'P'vect='P', lda max (1,min (r,k)) lda max(1,min(r,k)) .
The second dimension of the array must be at least max (1,min (r,k)) max(1,min(r,k))  if vect = 'Q'vect='Q' and at least max (1,r)max(1,r) if vect = 'P'vect='P'
Details of the vectors which define the elementary reflectors, as returned by nag_lapack_zgebrd (f08ks).
6:     tau( : :) – complex array
Note: the dimension of the array tau must be at least max (1,min (r,k))max(1,min(r,k)).
Further details of the elementary reflectors, as returned by nag_lapack_zgebrd (f08ks) in its parameter tauq if vect = 'Q'vect='Q', or in its parameter taup if vect = 'P'vect='P'.
7:     c(ldc, : :) – complex 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 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.
Constraint: m0m0.
2:     n – int64int32nag_int scalar
Default: The second dimension of the array c.
nn, the number of columns of the matrix CC.
Constraint: n0n0.

Input Parameters Omitted from the MATLAB Interface

lda ldc work lwork

Output Parameters

1:     c(ldc, : :) – complex 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 QHCQHC or CQCQ or CHQCHQ or PCPC or PHCPHC or CPCP or CHPCHP as specified by vect, side and trans.
2:     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: vect, 2: side, 3: trans, 4: m, 5: n, 6: k, 7: a, 8: lda, 9: tau, 10: c, 11: ldc, 12: work, 13: lwork, 14: 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 real floating point operations is approximately where kk is the value of the parameter k
The real analogue of this function is nag_lapack_dormbr (f08kg).

Example

function nag_lapack_zunmbr_example
vect = 'Q';
side = 'Right';
trans = 'No transpose';
k = int64(4);
a = [complex(-3.087005021051958),  2.112571007455839 + 0i, ...
    0.05433411079440312 + 0.4543118496773522i,  0.375743827925403 + 0.1070087304094524i;
      0 + 0i,  -2.066039276679068 + 0i, ...
     -1.262810106655224 + 0i,  0.02827717828732752 + 0.1650056103049374i;
      0 + 0i,  -0.2804787991136917 - 0.4124461074713915i, ...
      -1.873128891125712 + 0i,  1.612633872800391 + 0i;
      0 + 0i,  0.2103472372638732 - 0.4460760994276616i, ...
     -0.5708419424841372 + 0.06437446295221612i,  -2.002182866206992 + 0i];
tau = [0;
      1.098198238126112 + 0.5158162160396563i;
      1.455158088337053 - 0.2659229774958434i;
      1.989879752802885 - 0.1419086853962756i];
c = [ -0.3109810296560065 + 0.2623902437722555i, ...
    -0.3175341445023601 + 0.4834967063433271i,  0.4966143187964562 - 0.2996834399081108i, ...
      -0.007195817944538043 - 0.3717893210480535i;
      0.3174598011071733 - 0.6413983736655133i, ...
    -0.2061862718385913 + 0.1576964755255177i,  -0.07925902434510126 - 0.3093749483233558i, ...
      -0.02816166060051156 - 0.1491467515264786i;
      -0.2008419149861708 + 0.1490117433768365i, ...
    0.4891881009599058 - 0.09002535062431442i,  0.035745707605966 - 0.02190382125352534i, ...
      0.5624615849142621 - 0.07099355406423355i;
      0.1198572718465858 - 0.1230966575721692i, ...
    0.2566010661168247 - 0.3055384784364648i,  0.4488646004434153 - 0.2140825016792581i, ...
      -0.1651301691537539 + 0.1799762380267428i;
      -0.2688690152234222 - 0.1652086720047534i, ...
    0.1696708265434812 - 0.2490702105456178i,  -0.04956098112958145 + 0.1157544723073297i, ...
      -0.48852018643744 - 0.4540377976759434i;
      -0.3498536583630073 + 0.09070280031633525i, ...
    -0.049104334058638 - 0.3133356336974162i,  -0.1256478989223875 - 0.5299605073526112i, ...
      0.1039065872268565 + 0.04496306210314513i];
[cOut, info] = nag_lapack_zunmbr(vect, side, trans, k, a, tau, c)
 

cOut =

  -0.3110 + 0.2624i   0.6521 + 0.5532i   0.0427 + 0.0361i  -0.2634 - 0.0741i
   0.3175 - 0.6414i   0.3488 + 0.0721i   0.2287 + 0.0069i   0.1101 - 0.0326i
  -0.2008 + 0.1490i  -0.3103 + 0.0230i   0.1855 - 0.1817i  -0.2956 + 0.5648i
   0.1199 - 0.1231i  -0.0046 - 0.0005i  -0.3305 + 0.4821i  -0.0675 + 0.3464i
  -0.2689 - 0.1652i   0.1794 - 0.0586i  -0.5235 - 0.2580i   0.3927 + 0.1450i
  -0.3499 + 0.0907i   0.0829 - 0.0506i   0.3202 + 0.3038i   0.3174 + 0.3241i


info =

                    0


function f08ku_example
vect = 'Q';
side = 'Right';
trans = 'No transpose';
k = int64(4);
a = [complex(-3.087005021051958),  2.112571007455839 + 0i, ...
    0.05433411079440312 + 0.4543118496773522i,  0.375743827925403 + 0.1070087304094524i;
      0 + 0i,  -2.066039276679068 + 0i, ...
     -1.262810106655224 + 0i,  0.02827717828732752 + 0.1650056103049374i;
      0 + 0i,  -0.2804787991136917 - 0.4124461074713915i, ...
      -1.873128891125712 + 0i,  1.612633872800391 + 0i;
      0 + 0i,  0.2103472372638732 - 0.4460760994276616i, ...
     -0.5708419424841372 + 0.06437446295221612i,  -2.002182866206992 + 0i];
tau = [0;
      1.098198238126112 + 0.5158162160396563i;
      1.455158088337053 - 0.2659229774958434i;
      1.989879752802885 - 0.1419086853962756i];
c = [ -0.3109810296560065 + 0.2623902437722555i, ...
    -0.3175341445023601 + 0.4834967063433271i,  0.4966143187964562 - 0.2996834399081108i, ...
      -0.007195817944538043 - 0.3717893210480535i;
      0.3174598011071733 - 0.6413983736655133i, ...
    -0.2061862718385913 + 0.1576964755255177i,  -0.07925902434510126 - 0.3093749483233558i, ...
      -0.02816166060051156 - 0.1491467515264786i;
      -0.2008419149861708 + 0.1490117433768365i, ...
    0.4891881009599058 - 0.09002535062431442i,  0.035745707605966 - 0.02190382125352534i, ...
      0.5624615849142621 - 0.07099355406423355i;
      0.1198572718465858 - 0.1230966575721692i, ...
    0.2566010661168247 - 0.3055384784364648i,  0.4488646004434153 - 0.2140825016792581i, ...
      -0.1651301691537539 + 0.1799762380267428i;
      -0.2688690152234222 - 0.1652086720047534i, ...
    0.1696708265434812 - 0.2490702105456178i,  -0.04956098112958145 + 0.1157544723073297i, ...
      -0.48852018643744 - 0.4540377976759434i;
      -0.3498536583630073 + 0.09070280031633525i, ...
    -0.049104334058638 - 0.3133356336974162i,  -0.1256478989223875 - 0.5299605073526112i, ...
      0.1039065872268565 + 0.04496306210314513i];
[cOut, info] = f08ku(vect, side, trans, k, a, tau, c)
 

cOut =

  -0.3110 + 0.2624i   0.6521 + 0.5532i   0.0427 + 0.0361i  -0.2634 - 0.0741i
   0.3175 - 0.6414i   0.3488 + 0.0721i   0.2287 + 0.0069i   0.1101 - 0.0326i
  -0.2008 + 0.1490i  -0.3103 + 0.0230i   0.1855 - 0.1817i  -0.2956 + 0.5648i
   0.1199 - 0.1231i  -0.0046 - 0.0005i  -0.3305 + 0.4821i  -0.0675 + 0.3464i
  -0.2689 - 0.1652i   0.1794 - 0.0586i  -0.5235 - 0.2580i   0.3927 + 0.1450i
  -0.3499 + 0.0907i   0.0829 - 0.0506i   0.3202 + 0.3038i   0.3174 + 0.3241i


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