1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
<HTML>
<HEAD><TITLE>MB01RT - SLICOT Library Routine Documentation</TITLE>
</HEAD>
<BODY>
<H2><A Name="MB01RT">MB01RT</A></H2>
<H3>
Computation of matrix expression alpha R + beta op(E) X op(E)' with R, X symmetric and E upper triangular
</H3>
<A HREF ="#Specification"><B>[Specification]</B></A>
<A HREF ="#Arguments"><B>[Arguments]</B></A>
<A HREF ="#Method"><B>[Method]</B></A>
<A HREF ="#References"><B>[References]</B></A>
<A HREF ="#Comments"><B>[Comments]</B></A>
<A HREF ="#Example"><B>[Example]</B></A>
<P>
<B><FONT SIZE="+1">Purpose</FONT></B>
<PRE>
To compute the matrix formula
R := alpha*R + beta*op( E )*X*op( E )',
where alpha and beta are scalars, R and X are symmetric matrices,
E is an upper triangular matrix, and op( E ) is one of
op( E ) = E or op( E ) = E'.
The result is overwritten on R.
</PRE>
<A name="Specification"><B><FONT SIZE="+1">Specification</FONT></B></A>
<PRE>
SUBROUTINE MB01RT( UPLO, TRANS, N, ALPHA, BETA, R, LDR, E, LDE,
$ X, LDX, DWORK, LDWORK, INFO )
C .. Scalar Arguments ..
CHARACTER TRANS, UPLO
INTEGER INFO, LDE, LDR, LDWORK, LDX, N
DOUBLE PRECISION ALPHA, BETA
C .. Array Arguments ..
DOUBLE PRECISION DWORK(*), E(LDE,*), R(LDR,*), X(LDX,*)
</PRE>
<A name="Arguments"><B><FONT SIZE="+1">Arguments</FONT></B></A>
<P>
<B>Mode Parameters</B>
<PRE>
UPLO CHARACTER*1
Specifies which triangles of the symmetric matrices R
and X are given as follows:
= 'U': the upper triangular part is given;
= 'L': the lower triangular part is given.
TRANS CHARACTER*1
Specifies the form of op( E ) to be used in the matrix
multiplication as follows:
= 'N': op( E ) = E;
= 'T': op( E ) = E';
= 'C': op( E ) = E'.
</PRE>
<B>Input/Output Parameters</B>
<PRE>
N (input) INTEGER
The order of the matrices R, E, and X. N >= 0.
ALPHA (input) DOUBLE PRECISION
The scalar alpha. When alpha is zero then R need not be
set before entry, except when R is identified with X in
the call.
BETA (input) DOUBLE PRECISION
The scalar beta. When beta is zero then E and X are not
referenced.
R (input/output) DOUBLE PRECISION array, dimension (LDR,N)
On entry with UPLO = 'U', the leading N-by-N upper
triangular part of this array must contain the upper
triangular part of the symmetric matrix R.
On entry with UPLO = 'L', the leading N-by-N lower
triangular part of this array must contain the lower
triangular part of the symmetric matrix R.
In both cases, the other strictly triangular part is not
referenced.
On exit, the leading N-by-N upper triangular part (if
UPLO = 'U'), or lower triangular part (if UPLO = 'L'), of
this array contains the corresponding triangular part of
the computed matrix R.
LDR INTEGER
The leading dimension of array R. LDR >= MAX(1,N).
E (input) DOUBLE PRECISION array, dimension (LDE,N)
On entry, the leading N-by-N upper triangular part of this
array must contain the upper triangular matrix E.
The remaining part of this array is not referenced.
LDE INTEGER
The leading dimension of array E. LDE >= MAX(1,N).
X (input) DOUBLE PRECISION array, dimension (LDX,N)
On entry, if UPLO = 'U', the leading N-by-N upper
triangular part of this array must contain the upper
triangular part of the symmetric matrix X and the strictly
lower triangular part of the array is not referenced.
On entry, if UPLO = 'L', the leading N-by-N lower
triangular part of this array must contain the lower
triangular part of the symmetric matrix X and the strictly
upper triangular part of the array is not referenced.
The diagonal elements of this array are modified
internally, but are restored on exit.
LDX INTEGER
The leading dimension of array X. LDX >= MAX(1,N).
</PRE>
<B>Workspace</B>
<PRE>
DWORK DOUBLE PRECISION array, dimension (LDWORK)
This array is not referenced when beta = 0, or N = 0.
LDWORK The length of the array DWORK.
LDWORK >= N*N, if beta <> 0;
LDWORK >= 0, if beta = 0.
</PRE>
<B>Error Indicator</B>
<PRE>
INFO INTEGER
= 0: successful exit;
< 0: if INFO = -k, the k-th argument had an illegal
value.
</PRE>
<A name="Method"><B><FONT SIZE="+1">Method</FONT></B></A>
<PRE>
The matrix expression is efficiently evaluated taking the symmetry
into account. Specifically, let X = U + L, with U and L upper and
lower triangular matrices, defined by
U = triu( X ) - (1/2)*diag( X ),
L = tril( X ) - (1/2)*diag( X ),
where triu, tril, and diag denote the upper triangular part, lower
triangular part, and diagonal part of X, respectively. Then,
if UPLO = 'U',
E*X*E' = ( E*U )*E' + E*( E*U )', for TRANS = 'N',
E'*X*E = E'*( U*E ) + ( U*E )'*E, for TRANS = 'T', or 'C',
and if UPLO = 'L',
E*X*E' = ( E*L' )*E' + E*( E*L' )', for TRANS = 'N',
E'*X*E = E'*( L'*E ) + ( L'*E )'*E, for TRANS = 'T', or 'C',
which involve operations like in BLAS 2 and 3 (DTRMV and DSYR2K).
This approach ensures that the matrices E*U, U*E, E*L', or L'*E
are upper triangular.
</PRE>
<A name="Numerical Aspects"><B><FONT SIZE="+1">Numerical Aspects</FONT></B></A>
<PRE>
The algorithm requires approximately N**3/2 operations.
</PRE>
<A name="Comments"><B><FONT SIZE="+1">Further Comments</FONT></B></A>
<PRE>
None
</PRE>
<A name="Example"><B><FONT SIZE="+1">Example</FONT></B></A>
<P>
<B>Program Text</B>
<PRE>
None
</PRE>
<B>Program Data</B>
<PRE>
None
</PRE>
<B>Program Results</B>
<PRE>
None
</PRE>
<HR>
<A HREF=support.html><B>Return to Supporting Routines index</B></A></BODY>
</HTML>
|