sstedc.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 431 行 · 第 1/3 页
HTML
431 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>sstedc.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="SSTEDC.1"></a><a href="sstedc.f.html#SSTEDC.1">SSTEDC</a>( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK driver 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, LIWORK, LWORK, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER IWORK( * )
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="SSTEDC.20"></a><a href="sstedc.f.html#SSTEDC.1">SSTEDC</a> computes all eigenvalues and, optionally, eigenvectors of a
</span><span class="comment">*</span><span class="comment"> symmetric tridiagonal matrix using the divide and conquer method.
</span><span class="comment">*</span><span class="comment"> The eigenvectors of a full or band real symmetric matrix can also be
</span><span class="comment">*</span><span class="comment"> found if <a name="SSYTRD.23"></a><a href="ssytrd.f.html#SSYTRD.1">SSYTRD</a> or <a name="SSPTRD.23"></a><a href="ssptrd.f.html#SSPTRD.1">SSPTRD</a> or <a name="SSBTRD.23"></a><a href="ssbtrd.f.html#SSBTRD.1">SSBTRD</a> has been used to reduce this
</span><span class="comment">*</span><span class="comment"> matrix to tridiagonal form.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> This code makes very mild assumptions about floating point
</span><span class="comment">*</span><span class="comment"> arithmetic. It will work on machines with a guard digit in
</span><span class="comment">*</span><span class="comment"> add/subtract, or on those binary machines without guard digits
</span><span class="comment">*</span><span class="comment"> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
</span><span class="comment">*</span><span class="comment"> It could conceivably fail on hexadecimal or decimal machines
</span><span class="comment">*</span><span class="comment"> without guard digits, but we know of none. See <a name="SLAED3.31"></a><a href="slaed3.f.html#SLAED3.1">SLAED3</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"> COMPZ (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': Compute eigenvalues only.
</span><span class="comment">*</span><span class="comment"> = 'I': Compute eigenvectors of tridiagonal matrix also.
</span><span class="comment">*</span><span class="comment"> = 'V': Compute eigenvectors of original dense symmetric
</span><span class="comment">*</span><span class="comment"> matrix also. On entry, 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">
</span><span class="comment">*</span><span class="comment"> N (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The dimension of the symmetric tridiagonal 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 diagonal elements of the tridiagonal matrix.
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, the eigenvalues in ascending 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 subdiagonal elements of the tridiagonal 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', then Z contains the orthogonal
</span><span class="comment">*</span><span class="comment"> matrix used in the reduction to tridiagonal form.
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
</span><span class="comment">*</span><span class="comment"> orthonormal eigenvectors of the original symmetric matrix,
</span><span class="comment">*</span><span class="comment"> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
</span><span class="comment">*</span><span class="comment"> of the symmetric tridiagonal matrix.
</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.
</span><span class="comment">*</span><span class="comment"> If eigenvectors are desired, then LDZ >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LWORK (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The dimension of the array WORK.
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'N' or N <= 1 then LWORK must be at least 1.
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'V' and N > 1 then LWORK must be at least
</span><span class="comment">*</span><span class="comment"> ( 1 + 3*N + 2*N*lg N + 3*N**2 ),
</span><span class="comment">*</span><span class="comment"> where lg( N ) = smallest integer k such
</span><span class="comment">*</span><span class="comment"> that 2**k >= N.
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'I' and N > 1 then LWORK must be at least
</span><span class="comment">*</span><span class="comment"> ( 1 + 4*N + N**2 ).
</span><span class="comment">*</span><span class="comment"> Note that for COMPZ = 'I' or 'V', then if N is less than or
</span><span class="comment">*</span><span class="comment"> equal to the minimum divide size, usually 25, then LWORK need
</span><span class="comment">*</span><span class="comment"> only be max(1,2*(N-1)).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If LWORK = -1, then a workspace query is assumed; the routine
</span><span class="comment">*</span><span class="comment"> only calculates the optimal size of the WORK array, returns
</span><span class="comment">*</span><span class="comment"> this value as the first entry of the WORK array, and no error
</span><span class="comment">*</span><span class="comment"> message related to LWORK is issued by <a name="XERBLA.87"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LIWORK (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The dimension of the array IWORK.
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1.
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'V' and N > 1 then LIWORK must be at least
</span><span class="comment">*</span><span class="comment"> ( 6 + 6*N + 5*N*lg N ).
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'I' and N > 1 then LIWORK must be at least
</span><span class="comment">*</span><span class="comment"> ( 3 + 5*N ).
</span><span class="comment">*</span><span class="comment"> Note that for COMPZ = 'I' or 'V', then if N is less than or
</span><span class="comment">*</span><span class="comment"> equal to the minimum divide size, usually 25, then LIWORK
</span><span class="comment">*</span><span class="comment"> need only be 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If LIWORK = -1, then a workspace query is assumed; the
</span><span class="comment">*</span><span class="comment"> routine only calculates the optimal size of the IWORK array,
</span><span class="comment">*</span><span class="comment"> returns this value as the first entry of the IWORK array, and
</span><span class="comment">*</span><span class="comment"> no error message related to LIWORK is issued by <a name="XERBLA.106"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</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"> > 0: The algorithm failed to compute an eigenvalue while
</span><span class="comment">*</span><span class="comment"> working on the submatrix lying in rows and columns
</span><span class="comment">*</span><span class="comment"> INFO/(N+1) through mod(INFO,N+1).
</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"> Jeff Rutter, Computer Science Division, University of California
</span><span class="comment">*</span><span class="comment"> at Berkeley, USA
</span><span class="comment">*</span><span class="comment"> Modified by Francoise Tisseur, University of Tennessee.
</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 ..
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?