stgsy2.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 981 行 · 第 1/5 页
HTML
981 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>stgsy2.f</title>
<meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!--
body { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.default { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.default a { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
span.string { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.string a { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
span.comment { color: rgb(178, 34, 34); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.comment a { color: rgb(178, 34, 34); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
--></style>
</head>
<body>
<pre>
SUBROUTINE <a name="STGSY2.1"></a><a href="stgsy2.f.html#STGSY2.1">STGSY2</a>( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
$ IWORK, PQ, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK auxiliary routine (version 3.1.1) --
</span><span class="comment">*</span><span class="comment"> Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment"> January 2007
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> CHARACTER TRANS
INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N,
$ PQ
REAL RDSCAL, RDSUM, SCALE
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER IWORK( * )
REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
$ D( LDD, * ), E( LDE, * ), F( LDF, * )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Purpose
</span><span class="comment">*</span><span class="comment"> =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="STGSY2.24"></a><a href="stgsy2.f.html#STGSY2.1">STGSY2</a> solves the generalized Sylvester equation:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A * R - L * B = scale * C (1)
</span><span class="comment">*</span><span class="comment"> D * R - L * E = scale * F,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices,
</span><span class="comment">*</span><span class="comment"> (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
</span><span class="comment">*</span><span class="comment"> N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E)
</span><span class="comment">*</span><span class="comment"> must be in generalized Schur canonical form, i.e. A, B are upper
</span><span class="comment">*</span><span class="comment"> quasi triangular and D, E are upper triangular. The solution (R, L)
</span><span class="comment">*</span><span class="comment"> overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor
</span><span class="comment">*</span><span class="comment"> chosen to avoid overflow.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> In matrix notation solving equation (1) corresponds to solve
</span><span class="comment">*</span><span class="comment"> Z*x = scale*b, where Z is defined as
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z = [ kron(In, A) -kron(B', Im) ] (2)
</span><span class="comment">*</span><span class="comment"> [ kron(In, D) -kron(E', Im) ],
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Ik is the identity matrix of size k and X' is the transpose of X.
</span><span class="comment">*</span><span class="comment"> kron(X, Y) is the Kronecker product between the matrices X and Y.
</span><span class="comment">*</span><span class="comment"> In the process of solving (1), we solve a number of such systems
</span><span class="comment">*</span><span class="comment"> where Dim(In), Dim(In) = 1 or 2.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If TRANS = 'T', solve the transposed system Z'*y = scale*b for y,
</span><span class="comment">*</span><span class="comment"> which is equivalent to solve for R and L in
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A' * R + D' * L = scale * C (3)
</span><span class="comment">*</span><span class="comment"> R * B' + L * E' = scale * -F
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> This case is used to compute an estimate of Dif[(A, D), (B, E)] =
</span><span class="comment">*</span><span class="comment"> sigma_min(Z) using reverse communicaton with <a name="SLACON.55"></a><a href="slacon.f.html#SLACON.1">SLACON</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="STGSY2.57"></a><a href="stgsy2.f.html#STGSY2.1">STGSY2</a> also (IJOB >= 1) contributes to the computation in <a name="STGSYL.57"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>
</span><span class="comment">*</span><span class="comment"> of an upper bound on the separation between to matrix pairs. Then
</span><span class="comment">*</span><span class="comment"> the input (A, D), (B, E) are sub-pencils of the matrix pair in
</span><span class="comment">*</span><span class="comment"> <a name="STGSYL.60"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>. See <a name="STGSYL.60"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a> for details.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Arguments
</span><span class="comment">*</span><span class="comment"> =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> TRANS (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N', solve the generalized Sylvester equation (1).
</span><span class="comment">*</span><span class="comment"> = 'T': solve the 'transposed' system (3).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IJOB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> Specifies what kind of functionality to be performed.
</span><span class="comment">*</span><span class="comment"> = 0: solve (1) only.
</span><span class="comment">*</span><span class="comment"> = 1: A contribution from this subsystem to a Frobenius
</span><span class="comment">*</span><span class="comment"> norm-based estimate of the separation between two matrix
</span><span class="comment">*</span><span class="comment"> pairs is computed. (look ahead strategy is used).
</span><span class="comment">*</span><span class="comment"> = 2: A contribution from this subsystem to a Frobenius
</span><span class="comment">*</span><span class="comment"> norm-based estimate of the separation between two matrix
</span><span class="comment">*</span><span class="comment"> pairs is computed. (<a name="SGECON.77"></a><a href="sgecon.f.html#SGECON.1">SGECON</a> on sub-systems is used.)
</span><span class="comment">*</span><span class="comment"> Not referenced if TRANS = 'T'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> M (input) INTEGER
</span><span class="comment">*</span><span class="comment"> On entry, M specifies the order of A and D, and the row
</span><span class="comment">*</span><span class="comment"> dimension of C, F, R and L.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> N (input) INTEGER
</span><span class="comment">*</span><span class="comment"> On entry, N specifies the order of B and E, and the column
</span><span class="comment">*</span><span class="comment"> dimension of C, F, R and L.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A (input) REAL array, dimension (LDA, M)
</span><span class="comment">*</span><span class="comment"> On entry, A contains an upper quasi triangular matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDA (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix A. LDA >= max(1, M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B (input) REAL array, dimension (LDB, N)
</span><span class="comment">*</span><span class="comment"> On entry, B contains an upper quasi triangular matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix B. LDB >= max(1, N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> C (input/output) REAL array, dimension (LDC, N)
</span><span class="comment">*</span><span class="comment"> On entry, C contains the right-hand-side of the first matrix
</span><span class="comment">*</span><span class="comment"> equation in (1).
</span><span class="comment">*</span><span class="comment"> On exit, if IJOB = 0, C has been overwritten by the
</span><span class="comment">*</span><span class="comment"> solution R.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDC (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix C. LDC >= max(1, M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> D (input) REAL array, dimension (LDD, M)
</span><span class="comment">*</span><span class="comment"> On entry, D contains an upper triangular matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDD (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix D. LDD >= max(1, M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> E (input) REAL array, dimension (LDE, N)
</span><span class="comment">*</span><span class="comment"> On entry, E contains an upper triangular matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDE (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix E. LDE >= max(1, N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> F (input/output) REAL array, dimension (LDF, N)
</span><span class="comment">*</span><span class="comment"> On entry, F contains the right-hand-side of the second matrix
</span><span class="comment">*</span><span class="comment"> equation in (1).
</span><span class="comment">*</span><span class="comment"> On exit, if IJOB = 0, F has been overwritten by the
</span><span class="comment">*</span><span class="comment"> solution L.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDF (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix F. LDF >= max(1, M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SCALE (output) REAL
</span><span class="comment">*</span><span class="comment"> On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
</span><span class="comment">*</span><span class="comment"> R and L (C and F on entry) will hold the solutions to a
</span><span class="comment">*</span><span class="comment"> slightly perturbed system but the input matrices A, B, D and
</span><span class="comment">*</span><span class="comment"> E have not been changed. If SCALE = 0, R and L will hold the
</span><span class="comment">*</span><span class="comment"> solutions to the homogeneous system with C = F = 0. Normally,
</span><span class="comment">*</span><span class="comment"> SCALE = 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RDSUM (input/output) REAL
</span><span class="comment">*</span><span class="comment"> On entry, the sum of squares of computed contributions to
</span><span class="comment">*</span><span class="comment"> the Dif-estimate under computation by <a name="STGSYL.140"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>, where the
</span><span class="comment">*</span><span class="comment"> scaling factor RDSCAL (see below) has been factored out.
</span><span class="comment">*</span><span class="comment"> On exit, the corresponding sum of squares updated with the
</span><span class="comment">*</span><span class="comment"> contributions from the current sub-system.
</span><span class="comment">*</span><span class="comment"> If TRANS = 'T' RDSUM is not touched.
</span><span class="comment">*</span><span class="comment"> NOTE: RDSUM only makes sense when <a name="STGSY2.145"></a><a href="stgsy2.f.html#STGSY2.1">STGSY2</a> is called by <a name="STGSYL.145"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RDSCAL (input/output) REAL
</span><span class="comment">*</span><span class="comment"> On entry, scaling factor used to prevent overflow in RDSUM.
</span><span class="comment">*</span><span class="comment"> On exit, RDSCAL is updated w.r.t. the current contributions
</span><span class="comment">*</span><span class="comment"> in RDSUM.
</span><span class="comment">*</span><span class="comment"> If TRANS = 'T', RDSCAL is not touched.
</span><span class="comment">*</span><span class="comment"> NOTE: RDSCAL only makes sense when <a name="STGSY2.152"></a><a href="stgsy2.f.html#STGSY2.1">STGSY2</a> is called by
</span><span class="comment">*</span><span class="comment"> <a name="STGSYL.153"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IWORK (workspace) INTEGER array, dimension (M+N+2)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> PQ (output) INTEGER
</span><span class="comment">*</span><span class="comment"> On exit, the number of subsystems (of size 2-by-2, 4-by-4 and
</span><span class="comment">*</span><span class="comment"> 8-by-8) solved by this routine.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> INFO (output) INTEGER
</span><span class="comment">*</span><span class="comment"> On exit, if INFO is set to
</span><span class="comment">*</span><span class="comment"> =0: Successful exit
</span><span class="comment">*</span><span class="comment"> <0: If INFO = -i, the i-th argument had an illegal value.
</span><span class="comment">*</span><span class="comment"> >0: The matrix pairs (A, D) and (B, E) have common or very
</span><span class="comment">*</span><span class="comment"> close eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Further Details
</span><span class="comment">*</span><span class="comment"> ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Based on contributions by
</span><span class="comment">*</span><span class="comment"> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
</span><span class="comment">*</span><span class="comment"> Umea University, S-901 87 Umea, Sweden.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> =====================================================================
</span><span class="comment">*</span><span class="comment"> Replaced various illegal calls to SCOPY by calls to <a name="SLASET.176"></a><a href="slaset.f.html#SLASET.1">SLASET</a>.
</span><span class="comment">*</span><span class="comment"> Sven Hammarling, 27/5/02.
</span><span class="comment">*</span><span class="comment">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?