dtgsen.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 748 行 · 第 1/4 页
HTML
748 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dtgsen.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="DTGSEN.1"></a><a href="dtgsen.f.html#DTGSEN.1">DTGSEN</a>( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
$ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
$ PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK 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"> Modified to call <a name="DLACN2.9"></a><a href="dlacn2.f.html#DLACN2.1">DLACN2</a> in place of <a name="DLACON.9"></a><a href="dlacon.f.html#DLACON.1">DLACON</a>, 5 Feb 03, SJH.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> LOGICAL WANTQ, WANTZ
INTEGER IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
$ M, N
DOUBLE PRECISION PL, PR
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> LOGICAL SELECT( * )
INTEGER IWORK( * )
DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
$ B( LDB, * ), BETA( * ), DIF( * ), Q( LDQ, * ),
$ WORK( * ), Z( LDZ, * )
<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="DTGSEN.28"></a><a href="dtgsen.f.html#DTGSEN.1">DTGSEN</a> reorders the generalized real Schur decomposition of a real
</span><span class="comment">*</span><span class="comment"> matrix pair (A, B) (in terms of an orthonormal equivalence trans-
</span><span class="comment">*</span><span class="comment"> formation Q' * (A, B) * Z), so that a selected cluster of eigenvalues
</span><span class="comment">*</span><span class="comment"> appears in the leading diagonal blocks of the upper quasi-triangular
</span><span class="comment">*</span><span class="comment"> matrix A and the upper triangular B. The leading columns of Q and
</span><span class="comment">*</span><span class="comment"> Z form orthonormal bases of the corresponding left and right eigen-
</span><span class="comment">*</span><span class="comment"> spaces (deflating subspaces). (A, B) must be in generalized real
</span><span class="comment">*</span><span class="comment"> Schur canonical form (as returned by <a name="DGGES.35"></a><a href="dgges.f.html#DGGES.1">DGGES</a>), i.e. A is block upper
</span><span class="comment">*</span><span class="comment"> triangular with 1-by-1 and 2-by-2 diagonal blocks. B is upper
</span><span class="comment">*</span><span class="comment"> triangular.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="DTGSEN.39"></a><a href="dtgsen.f.html#DTGSEN.1">DTGSEN</a> also computes the generalized eigenvalues
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> w(j) = (ALPHAR(j) + i*ALPHAI(j))/BETA(j)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> of the reordered matrix pair (A, B).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Optionally, <a name="DTGSEN.45"></a><a href="dtgsen.f.html#DTGSEN.1">DTGSEN</a> computes the estimates of reciprocal condition
</span><span class="comment">*</span><span class="comment"> numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
</span><span class="comment">*</span><span class="comment"> (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
</span><span class="comment">*</span><span class="comment"> between the matrix pairs (A11, B11) and (A22,B22) that correspond to
</span><span class="comment">*</span><span class="comment"> the selected cluster and the eigenvalues outside the cluster, resp.,
</span><span class="comment">*</span><span class="comment"> and norms of "projections" onto left and right eigenspaces w.r.t.
</span><span class="comment">*</span><span class="comment"> the selected cluster in the (1,1)-block.
</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"> IJOB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> Specifies whether condition numbers are required for the
</span><span class="comment">*</span><span class="comment"> cluster of eigenvalues (PL and PR) or the deflating subspaces
</span><span class="comment">*</span><span class="comment"> (Difu and Difl):
</span><span class="comment">*</span><span class="comment"> =0: Only reorder w.r.t. SELECT. No extras.
</span><span class="comment">*</span><span class="comment"> =1: Reciprocal of norms of "projections" onto left and right
</span><span class="comment">*</span><span class="comment"> eigenspaces w.r.t. the selected cluster (PL and PR).
</span><span class="comment">*</span><span class="comment"> =2: Upper bounds on Difu and Difl. F-norm-based estimate
</span><span class="comment">*</span><span class="comment"> (DIF(1:2)).
</span><span class="comment">*</span><span class="comment"> =3: Estimate of Difu and Difl. 1-norm-based estimate
</span><span class="comment">*</span><span class="comment"> (DIF(1:2)).
</span><span class="comment">*</span><span class="comment"> About 5 times as expensive as IJOB = 2.
</span><span class="comment">*</span><span class="comment"> =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
</span><span class="comment">*</span><span class="comment"> version to get it all.
</span><span class="comment">*</span><span class="comment"> =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WANTQ (input) LOGICAL
</span><span class="comment">*</span><span class="comment"> .TRUE. : update the left transformation matrix Q;
</span><span class="comment">*</span><span class="comment"> .FALSE.: do not update Q.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WANTZ (input) LOGICAL
</span><span class="comment">*</span><span class="comment"> .TRUE. : update the right transformation matrix Z;
</span><span class="comment">*</span><span class="comment"> .FALSE.: do not update Z.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SELECT (input) LOGICAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> SELECT specifies the eigenvalues in the selected cluster.
</span><span class="comment">*</span><span class="comment"> To select a real eigenvalue w(j), SELECT(j) must be set to
</span><span class="comment">*</span><span class="comment"> .TRUE.. To select a complex conjugate pair of eigenvalues
</span><span class="comment">*</span><span class="comment"> w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
</span><span class="comment">*</span><span class="comment"> either SELECT(j) or SELECT(j+1) or both must be set to
</span><span class="comment">*</span><span class="comment"> .TRUE.; a complex conjugate pair of eigenvalues must be
</span><span class="comment">*</span><span class="comment"> either both included in the cluster or both excluded.
</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"> The order of the matrices A and B. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A (input/output) DOUBLE PRECISION array, dimension(LDA,N)
</span><span class="comment">*</span><span class="comment"> On entry, the upper quasi-triangular matrix A, with (A, B) in
</span><span class="comment">*</span><span class="comment"> generalized real Schur canonical form.
</span><span class="comment">*</span><span class="comment"> On exit, A is overwritten by the reordered matrix A.
</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 array A. LDA >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B (input/output) DOUBLE PRECISION array, dimension(LDB,N)
</span><span class="comment">*</span><span class="comment"> On entry, the upper triangular matrix B, with (A, B) in
</span><span class="comment">*</span><span class="comment"> generalized real Schur canonical form.
</span><span class="comment">*</span><span class="comment"> On exit, B is overwritten by the reordered matrix B.
</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 array B. LDB >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ALPHAR (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> ALPHAI (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> BETA (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
</span><span class="comment">*</span><span class="comment"> be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
</span><span class="comment">*</span><span class="comment"> and BETA(j),j=1,...,N are the diagonals of the complex Schur
</span><span class="comment">*</span><span class="comment"> form (S,T) that would result if the 2-by-2 diagonal blocks of
</span><span class="comment">*</span><span class="comment"> the real generalized Schur form of (A,B) were further reduced
</span><span class="comment">*</span><span class="comment"> to triangular form using complex unitary transformations.
</span><span class="comment">*</span><span class="comment"> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
</span><span class="comment">*</span><span class="comment"> positive, then the j-th and (j+1)-st eigenvalues are a
</span><span class="comment">*</span><span class="comment"> complex conjugate pair, with ALPHAI(j+1) negative.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
</span><span class="comment">*</span><span class="comment"> On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
</span><span class="comment">*</span><span class="comment"> On exit, Q has been postmultiplied by the left orthogonal
</span><span class="comment">*</span><span class="comment"> transformation matrix which reorder (A, B); The leading M
</span><span class="comment">*</span><span class="comment"> columns of Q form orthonormal bases for the specified pair of
</span><span class="comment">*</span><span class="comment"> left eigenspaces (deflating subspaces).
</span><span class="comment">*</span><span class="comment"> If WANTQ = .FALSE., Q is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDQ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array Q. LDQ >= 1;
</span><span class="comment">*</span><span class="comment"> and if WANTQ = .TRUE., LDQ >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
</span><span class="comment">*</span><span class="comment"> On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
</span><span class="comment">*</span><span class="comment"> On exit, Z has been postmultiplied by the left orthogonal
</span><span class="comment">*</span><span class="comment"> transformation matrix which reorder (A, B); The leading M
</span><span class="comment">*</span><span class="comment"> columns of Z form orthonormal bases for the specified pair of
</span><span class="comment">*</span><span class="comment"> left eigenspaces (deflating subspaces).
</span><span class="comment">*</span><span class="comment"> If WANTZ = .FALSE., Z is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDZ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array Z. LDZ >= 1;
</span><span class="comment">*</span><span class="comment"> If WANTZ = .TRUE., LDZ >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> M (output) INTEGER
</span><span class="comment">*</span><span class="comment"> The dimension of the specified pair of left and right eigen-
</span><span class="comment">*</span><span class="comment"> spaces (deflating subspaces). 0 <= M <= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> PL (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> PR (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
</span><span class="comment">*</span><span class="comment"> reciprocal of the norm of "projections" onto left and right
</span><span class="comment">*</span><span class="comment"> eigenspaces with respect to the selected cluster.
</span><span class="comment">*</span><span class="comment"> 0 < PL, PR <= 1.
</span><span class="comment">*</span><span class="comment"> If M = 0 or M = N, PL = PR = 1.
</span><span class="comment">*</span><span class="comment"> If IJOB = 0, 2 or 3, PL and PR are not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DIF (output) DOUBLE PRECISION array, dimension (2).
</span><span class="comment">*</span><span class="comment"> If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
</span><span class="comment">*</span><span class="comment"> If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
</span><span class="comment">*</span><span class="comment"> Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
</span><span class="comment">*</span><span class="comment"> estimates of Difu and Difl.
</span><span class="comment">*</span><span class="comment"> If M = 0 or N, DIF(1:2) = F-norm([A, B]).
</span><span class="comment">*</span><span class="comment"> If IJOB = 0 or 1, DIF is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) DOUBLE PRECISION array,
</span><span class="comment">*</span><span class="comment"> dimension (MAX(1,LWORK))
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?