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 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
|
<HTML>
<HEAD><TITLE>MB02GD - SLICOT Library Routine Documentation</TITLE>
</HEAD>
<BODY>
<H2><A Name="MB02GD">MB02GD</A></H2>
<H3>
Cholesky factorization of a banded symmetric positive definite block Toeplitz matrix
</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 Cholesky factor of a banded symmetric positive
definite (s.p.d.) block Toeplitz matrix, defined by either its
first block row, or its first block column, depending on the
routine parameter TYPET.
By subsequent calls of this routine the Cholesky factor can be
computed block column by block column.
</PRE>
<A name="Specification"><B><FONT SIZE="+1">Specification</FONT></B></A>
<PRE>
SUBROUTINE MB02GD( TYPET, TRIU, K, N, NL, P, S, T, LDT, RB, LDRB,
$ DWORK, LDWORK, INFO )
C .. Scalar Arguments ..
CHARACTER TRIU, TYPET
INTEGER INFO, K, LDRB, LDT, LDWORK, N, NL, P, S
C .. Array Arguments ..
DOUBLE PRECISION DWORK(LDWORK), RB(LDRB,*), T(LDT,*)
</PRE>
<A name="Arguments"><B><FONT SIZE="+1">Arguments</FONT></B></A>
<P>
<B>Mode Parameters</B>
<PRE>
TYPET CHARACTER*1
Specifies the type of T, as follows:
= 'R': T contains the first block row of an s.p.d. block
Toeplitz matrix; the Cholesky factor is upper
triangular;
= 'C': T contains the first block column of an s.p.d.
block Toeplitz matrix; the Cholesky factor is
lower triangular. This choice results in a column
oriented algorithm which is usually faster.
Note: in the sequel, the notation x / y means that
x corresponds to TYPET = 'R' and y corresponds to
TYPET = 'C'.
TRIU CHARACTER*1
Specifies the structure of the last block in T, as
follows:
= 'N': the last block has no special structure;
= 'T': the last block is lower / upper triangular.
</PRE>
<B>Input/Output Parameters</B>
<PRE>
K (input) INTEGER
The number of rows / columns in T, which should be equal
to the blocksize. K >= 0.
N (input) INTEGER
The number of blocks in T. N >= 1.
If TRIU = 'N', N >= 1;
if TRIU = 'T', N >= 2.
NL (input) INTEGER
The lower block bandwidth, i.e., NL + 1 is the number of
nonzero blocks in the first block column of the block
Toeplitz matrix.
If TRIU = 'N', 0 <= NL < N;
if TRIU = 'T', 1 <= NL < N.
P (input) INTEGER
The number of previously computed block rows / columns of
the Cholesky factor. 0 <= P <= N.
S (input) INTEGER
The number of block rows / columns of the Cholesky factor
to compute. 0 <= S <= N - P.
T (input/output) DOUBLE PRECISION array, dimension
(LDT,(NL+1)*K) / (LDT,K)
On entry, if P = 0, the leading K-by-(NL+1)*K /
(NL+1)*K-by-K part of this array must contain the first
block row / column of an s.p.d. block Toeplitz matrix.
On entry, if P > 0, the leading K-by-(NL+1)*K /
(NL+1)*K-by-K part of this array must contain the P-th
block row / column of the Cholesky factor.
On exit, if INFO = 0, then the leading K-by-(NL+1)*K /
(NL+1)*K-by-K part of this array contains the (P+S)-th
block row / column of the Cholesky factor.
LDT INTEGER
The leading dimension of the array T.
LDT >= MAX(1,K) / MAX(1,(NL+1)*K).
RB (input/output) DOUBLE PRECISION array, dimension
(LDRB,MIN(P+NL+S,N)*K) / (LDRB,MIN(P+S,N)*K)
On entry, if TYPET = 'R' and TRIU = 'N' and P > 0,
the leading (NL+1)*K-by-MIN(NL,N-P)*K part of this array
must contain the (P*K+1)-st to ((P+NL)*K)-th columns
of the upper Cholesky factor in banded format from a
previous call of this routine.
On entry, if TYPET = 'R' and TRIU = 'T' and P > 0,
the leading (NL*K+1)-by-MIN(NL,N-P)*K part of this array
must contain the (P*K+1)-st to (MIN(P+NL,N)*K)-th columns
of the upper Cholesky factor in banded format from a
previous call of this routine.
On exit, if TYPET = 'R' and TRIU = 'N', the leading
(NL+1)*K-by-MIN(NL+S,N-P)*K part of this array contains
the (P*K+1)-st to (MIN(P+NL+S,N)*K)-th columns of the
upper Cholesky factor in banded format.
On exit, if TYPET = 'R' and TRIU = 'T', the leading
(NL*K+1)-by-MIN(NL+S,N-P)*K part of this array contains
the (P*K+1)-st to (MIN(P+NL+S,N)*K)-th columns of the
upper Cholesky factor in banded format.
On exit, if TYPET = 'C' and TRIU = 'N', the leading
(NL+1)*K-by-MIN(S,N-P)*K part of this array contains
the (P*K+1)-st to (MIN(P+S,N)*K)-th columns of the lower
Cholesky factor in banded format.
On exit, if TYPET = 'C' and TRIU = 'T', the leading
(NL*K+1)-by-MIN(S,N-P)*K part of this array contains
the (P*K+1)-st to (MIN(P+S,N)*K)-th columns of the lower
Cholesky factor in banded format.
For further details regarding the band storage scheme see
the documentation of the LAPACK routine DPBTF2.
LDRB INTEGER
The leading dimension of the array RB.
If TRIU = 'N', LDRB >= MAX( (NL+1)*K,1 );
if TRIU = 'T', LDRB >= NL*K+1.
</PRE>
<B>Workspace</B>
<PRE>
DWORK DOUBLE PRECISION array, dimension (LDWORK)
On exit, if INFO = 0, DWORK(1) returns the optimal
value of LDWORK.
On exit, if INFO = -13, DWORK(1) returns the minimum
value of LDWORK.
The first 1 + ( NL + 1 )*K*K elements of DWORK should be
preserved during successive calls of the routine.
LDWORK INTEGER
The length of the array DWORK.
LDWORK >= 1 + ( NL + 1 )*K*K + NL*K.
For optimum performance LDWORK should be larger.
If LDWORK = -1, then a workspace query is assumed;
the routine only calculates the optimal size of the
DWORK array, returns this value as the first entry of
the DWORK array, and no error message related to LDWORK
is issued by XERBLA.
</PRE>
<B>Error Indicator</B>
<PRE>
INFO INTEGER
= 0: successful exit;
< 0: if INFO = -i, the i-th argument had an illegal
value;
= 1: the reduction algorithm failed. The Toeplitz matrix
associated with T is not (numerically) positive
definite.
</PRE>
<A name="Method"><B><FONT SIZE="+1">Method</FONT></B></A>
<PRE>
Householder transformations and modified hyperbolic rotations
are used in the Schur algorithm [1], [2].
</PRE>
<A name="References"><B><FONT SIZE="+1">References</FONT></B></A>
<PRE>
[1] Kailath, T. and Sayed, A.
Fast Reliable Algorithms for Matrices with Structure.
SIAM Publications, Philadelphia, 1999.
[2] Kressner, D. and Van Dooren, P.
Factorizations and linear system solvers for matrices with
Toeplitz structure.
SLICOT Working Note 2000-2, 2000.
</PRE>
<A name="Numerical Aspects"><B><FONT SIZE="+1">Numerical Aspects</FONT></B></A>
<PRE>
The implemented method is numerically stable.
3
The algorithm requires O( K *N*NL ) floating point 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>
* MB02GD EXAMPLE PROGRAM TEXT
*
* .. Parameters ..
INTEGER NIN, NOUT
PARAMETER ( NIN = 5, NOUT = 6 )
INTEGER KMAX, NMAX, NLMAX
PARAMETER ( KMAX = 20, NMAX = 20, NLMAX = 20 )
INTEGER LDRB, LDT, LDWORK
PARAMETER ( LDRB = ( NLMAX + 1 )*KMAX, LDT = KMAX*NMAX,
$ LDWORK = ( NLMAX + 1 )*KMAX*KMAX +
$ ( 3 + NLMAX )*KMAX )
* .. Local Scalars ..
INTEGER I, J, INFO, K, M, N, NL, SIZR
CHARACTER TRIU, TYPET
* .. Local Arrays dimensioned for TYPET = 'R' ..
DOUBLE PRECISION DWORK(LDWORK), RB(LDRB, NMAX*KMAX),
$ T(LDT, NMAX*KMAX)
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* .. External Subroutines ..
EXTERNAL MB02GD
*
* .. Executable Statements ..
WRITE ( NOUT, FMT = 99999 )
* Skip the heading in the data file and read the data.
READ ( NIN, FMT = '()' )
READ ( NIN, FMT = * ) K, N, NL, TRIU
TYPET = 'R'
M = ( NL + 1 )*K
IF( N.LE.0 .OR. N.GT.NMAX ) THEN
WRITE ( NOUT, FMT = 99995 ) N
ELSE IF( NL.LE.0 .OR. NL.GT.NLMAX ) THEN
WRITE ( NOUT, FMT = 99994 ) NL
ELSE IF( K.LE.0 .OR. K.GT.KMAX ) THEN
WRITE ( NOUT, FMT = 99993 ) K
ELSE
READ ( NIN, FMT = * ) ( ( T(I,J), J = 1,M ), I = 1,K )
* Compute the banded Cholesky factor.
CALL MB02GD( TYPET, TRIU, K, N, NL, 0, N, T, LDT, RB, LDRB,
$ DWORK, LDWORK, INFO )
*
IF ( INFO.NE.0 ) THEN
WRITE ( NOUT, FMT = 99998 ) INFO
ELSE
WRITE ( NOUT, FMT = 99997 )
IF ( LSAME( TRIU, 'T' ) ) THEN
SIZR = NL*K + 1
ELSE
SIZR = ( NL + 1 )*K
END IF
DO 10 I = 1, SIZR
WRITE ( NOUT, FMT = 99996 ) ( RB(I,J), J = 1, N*K )
10 CONTINUE
END IF
END IF
STOP
*
99999 FORMAT (' MB02GD EXAMPLE PROGRAM RESULTS',/1X)
99998 FORMAT (' INFO on exit from MB02GD = ',I2)
99997 FORMAT (/' The upper Cholesky factor in banded storage format ')
99996 FORMAT (20(1X,F8.4))
99995 FORMAT (/' N is out of range.',/' N = ',I5)
99994 FORMAT (/' NL is out of range.',/' NL = ',I5)
99993 FORMAT (/' K is out of range.',/' K = ',I5)
END
</PRE>
<B>Program Data</B>
<PRE>
MB02GD EXAMPLE PROGRAM DATA
2 4 2 T
3.0000 1.0000 0.1000 0.4000 0.2000 0.0000
0.0000 4.0000 0.1000 0.1000 0.0500 0.2000
</PRE>
<B>Program Results</B>
<PRE>
MB02GD EXAMPLE PROGRAM RESULTS
The upper Cholesky factor in banded storage format
0.0000 0.0000 0.0000 0.0000 0.1155 0.1044 0.1156 0.1051
0.0000 0.0000 0.0000 0.2309 -0.0087 0.2290 -0.0084 0.2302
0.0000 0.0000 0.0577 -0.0174 0.0541 -0.0151 0.0544 -0.0159
0.0000 0.5774 0.0348 0.5704 0.0222 0.5725 0.0223 0.5724
1.7321 1.9149 1.7307 1.9029 1.7272 1.8996 1.7272 1.8995
</PRE>
<HR>
<p>
<A HREF=..\libindex.html><B>Return to index</B></A></BODY>
</HTML>
|