sspgst.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 233 行 · 第 1/2 页
HTML
233 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>sspgst.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="SSPGST.1"></a><a href="sspgst.f.html#SSPGST.1">SSPGST</a>( ITYPE, UPLO, N, AP, BP, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK routine (version 3.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"> November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> CHARACTER UPLO
INTEGER INFO, ITYPE, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL AP( * ), BP( * )
<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="SSPGST.18"></a><a href="sspgst.f.html#SSPGST.1">SSPGST</a> reduces a real symmetric-definite generalized eigenproblem
</span><span class="comment">*</span><span class="comment"> to standard form, using packed storage.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If ITYPE = 1, the problem is A*x = lambda*B*x,
</span><span class="comment">*</span><span class="comment"> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
</span><span class="comment">*</span><span class="comment"> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B must have been previously factorized as U**T*U or L*L**T by <a name="SPPTRF.27"></a><a href="spptrf.f.html#SPPTRF.1">SPPTRF</a>.
</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"> ITYPE (input) INTEGER
</span><span class="comment">*</span><span class="comment"> = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
</span><span class="comment">*</span><span class="comment"> = 2 or 3: compute U*A*U**T or L**T*A*L.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> UPLO (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'U': Upper triangle of A is stored and B is factored as
</span><span class="comment">*</span><span class="comment"> U**T*U;
</span><span class="comment">*</span><span class="comment"> = 'L': Lower triangle of A is stored and B is factored as
</span><span class="comment">*</span><span class="comment"> L*L**T.
</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"> AP (input/output) REAL array, dimension (N*(N+1)/2)
</span><span class="comment">*</span><span class="comment"> On entry, the upper or lower triangle of the symmetric matrix
</span><span class="comment">*</span><span class="comment"> A, packed columnwise in a linear array. The j-th column of A
</span><span class="comment">*</span><span class="comment"> is stored in the array AP as follows:
</span><span class="comment">*</span><span class="comment"> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
</span><span class="comment">*</span><span class="comment"> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, the transformed matrix, stored in the
</span><span class="comment">*</span><span class="comment"> same format as A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> BP (input) REAL array, dimension (N*(N+1)/2)
</span><span class="comment">*</span><span class="comment"> The triangular factor from the Cholesky factorization of B,
</span><span class="comment">*</span><span class="comment"> stored in the same format as A, as returned by <a name="SPPTRF.57"></a><a href="spptrf.f.html#SPPTRF.1">SPPTRF</a>.
</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"> = 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">
</span><span class="comment">*</span><span class="comment"> =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Parameters ..
</span> REAL ONE, HALF
PARAMETER ( ONE = 1.0, HALF = 0.5 )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> LOGICAL UPPER
INTEGER J, J1, J1J1, JJ, K, K1, K1K1, KK
REAL AJJ, AKK, BJJ, BKK, CT
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL SAXPY, SSCAL, SSPMV, SSPR2, STPMV, STPSV,
$ <a name="XERBLA.76"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> LOGICAL <a name="LSAME.79"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
REAL SDOT
EXTERNAL <a name="LSAME.81"></a><a href="lsame.f.html#LSAME.1">LSAME</a>, SDOT
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Test the input parameters.
</span><span class="comment">*</span><span class="comment">
</span> INFO = 0
UPPER = <a name="LSAME.88"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'U'</span> )
IF( ITYPE.LT.1 .OR. ITYPE.GT.3 ) THEN
INFO = -1
ELSE IF( .NOT.UPPER .AND. .NOT.<a name="LSAME.91"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'L'</span> ) ) THEN
INFO = -2
ELSE IF( N.LT.0 ) THEN
INFO = -3
END IF
IF( INFO.NE.0 ) THEN
CALL <a name="XERBLA.97"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>( <span class="string">'<a name="SSPGST.97"></a><a href="sspgst.f.html#SSPGST.1">SSPGST</a>'</span>, -INFO )
RETURN
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?