spteqr.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 214 行 · 第 1/2 页
HTML
214 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>spteqr.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="SPTEQR.1"></a><a href="spteqr.f.html#SPTEQR.1">SPTEQR</a>( COMPZ, N, D, E, Z, LDZ, WORK, 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 COMPZ
INTEGER INFO, LDZ, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL D( * ), E( * ), 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="SPTEQR.18"></a><a href="spteqr.f.html#SPTEQR.1">SPTEQR</a> computes all eigenvalues and, optionally, eigenvectors of a
</span><span class="comment">*</span><span class="comment"> symmetric positive definite tridiagonal matrix by first factoring the
</span><span class="comment">*</span><span class="comment"> matrix using <a name="SPTTRF.20"></a><a href="spttrf.f.html#SPTTRF.1">SPTTRF</a>, and then calling <a name="SBDSQR.20"></a><a href="sbdsqr.f.html#SBDSQR.1">SBDSQR</a> to compute the singular
</span><span class="comment">*</span><span class="comment"> values of the bidiagonal factor.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> This routine computes the eigenvalues of the positive definite
</span><span class="comment">*</span><span class="comment"> tridiagonal matrix to high relative accuracy. This means that if the
</span><span class="comment">*</span><span class="comment"> eigenvalues range over many orders of magnitude in size, then the
</span><span class="comment">*</span><span class="comment"> small eigenvalues and corresponding eigenvectors will be computed
</span><span class="comment">*</span><span class="comment"> more accurately than, for example, with the standard QR method.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The eigenvectors of a full or band symmetric positive definite matrix
</span><span class="comment">*</span><span class="comment"> can also be found if <a name="SSYTRD.30"></a><a href="ssytrd.f.html#SSYTRD.1">SSYTRD</a>, <a name="SSPTRD.30"></a><a href="ssptrd.f.html#SSPTRD.1">SSPTRD</a>, or <a name="SSBTRD.30"></a><a href="ssbtrd.f.html#SSBTRD.1">SSBTRD</a> has been used to
</span><span class="comment">*</span><span class="comment"> reduce this matrix to tridiagonal form. (The reduction to tridiagonal
</span><span class="comment">*</span><span class="comment"> form, however, may preclude the possibility of obtaining high
</span><span class="comment">*</span><span class="comment"> relative accuracy in the small eigenvalues of the original matrix, if
</span><span class="comment">*</span><span class="comment"> these eigenvalues range over many orders of magnitude.)
</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"> COMPZ (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': Compute eigenvalues only.
</span><span class="comment">*</span><span class="comment"> = 'V': Compute eigenvectors of original symmetric
</span><span class="comment">*</span><span class="comment"> matrix also. Array Z contains the orthogonal
</span><span class="comment">*</span><span class="comment"> matrix used to reduce the original matrix to
</span><span class="comment">*</span><span class="comment"> tridiagonal form.
</span><span class="comment">*</span><span class="comment"> = 'I': Compute eigenvectors of tridiagonal matrix also.
</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 matrix. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> D (input/output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On entry, the n diagonal elements of the tridiagonal
</span><span class="comment">*</span><span class="comment"> matrix.
</span><span class="comment">*</span><span class="comment"> On normal exit, D contains the eigenvalues, in descending
</span><span class="comment">*</span><span class="comment"> order.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> E (input/output) REAL array, dimension (N-1)
</span><span class="comment">*</span><span class="comment"> On entry, the (n-1) subdiagonal elements of the tridiagonal
</span><span class="comment">*</span><span class="comment"> matrix.
</span><span class="comment">*</span><span class="comment"> On exit, E has been destroyed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input/output) REAL array, dimension (LDZ, N)
</span><span class="comment">*</span><span class="comment"> On entry, if COMPZ = 'V', the orthogonal matrix used in the
</span><span class="comment">*</span><span class="comment"> reduction to tridiagonal form.
</span><span class="comment">*</span><span class="comment"> On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
</span><span class="comment">*</span><span class="comment"> original symmetric matrix;
</span><span class="comment">*</span><span class="comment"> if COMPZ = 'I', the orthonormal eigenvectors of the
</span><span class="comment">*</span><span class="comment"> tridiagonal matrix.
</span><span class="comment">*</span><span class="comment"> If INFO > 0 on exit, Z contains the eigenvectors associated
</span><span class="comment">*</span><span class="comment"> with only the stored eigenvalues.
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'N', then 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, and if
</span><span class="comment">*</span><span class="comment"> COMPZ = 'V' or 'I', LDZ >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace) REAL array, dimension (4*N)
</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"> > 0: if INFO = i, and i is:
</span><span class="comment">*</span><span class="comment"> <= N the Cholesky factorization of the matrix could
</span><span class="comment">*</span><span class="comment"> not be performed because the i-th principal minor
</span><span class="comment">*</span><span class="comment"> was not positive definite.
</span><span class="comment">*</span><span class="comment"> > N the SVD algorithm failed to converge;
</span><span class="comment">*</span><span class="comment"> if INFO = N+i, i off-diagonal elements of the
</span><span class="comment">*</span><span class="comment"> bidiagonal factor did not converge to zero.
</span><span class="comment">*</span><span class="comment">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?