3
* =========== DOCUMENTATION ===========
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
9
*> Download DSTERF + dependencies
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsterf.f">
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsterf.f">
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsterf.f">
21
* SUBROUTINE DSTERF( N, D, E, INFO )
23
* .. Scalar Arguments ..
26
* .. Array Arguments ..
27
* DOUBLE PRECISION D( * ), E( * )
36
*> DSTERF computes all eigenvalues of a symmetric tridiagonal matrix
37
*> using the Pal-Walker-Kahan variant of the QL or QR algorithm.
46
*> The order of the matrix. N >= 0.
51
*> D is DOUBLE PRECISION array, dimension (N)
52
*> On entry, the n diagonal elements of the tridiagonal matrix.
53
*> On exit, if INFO = 0, the eigenvalues in ascending order.
58
*> E is DOUBLE PRECISION array, dimension (N-1)
59
*> On entry, the (n-1) subdiagonal elements of the tridiagonal
61
*> On exit, E has been destroyed.
67
*> = 0: successful exit
68
*> < 0: if INFO = -i, the i-th argument had an illegal value
69
*> > 0: the algorithm failed to find all of the eigenvalues in
70
*> a total of 30*N iterations; if INFO = i, then i
71
*> elements of E have not converged to zero.
77
*> \author Univ. of Tennessee
78
*> \author Univ. of California Berkeley
79
*> \author Univ. of Colorado Denver
82
*> \date November 2011
84
*> \ingroup auxOTHERcomputational
86
* =====================================================================
1
87
SUBROUTINE DSTERF( N, D, E, INFO )
3
* -- LAPACK routine (version 2.0) --
4
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
* Courant Institute, Argonne National Lab, and Rice University
89
* -- LAPACK computational routine (version 3.4.0) --
90
* -- LAPACK is a software package provided by Univ. of Tennessee, --
91
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
8
94
* .. Scalar Arguments ..
12
98
DOUBLE PRECISION D( * ), E( * )
16
* $Id: dsterf.f 19697 2010-10-29 16:57:34Z d3y133 $
21
* DSTERF computes all eigenvalues of a symmetric tridiagonal matrix
22
* using the Pal-Walker-Kahan variant of the QL or QR algorithm.
28
* The order of the matrix. N >= 0.
30
* D (input/output) DOUBLE PRECISION array, dimension (N)
31
* On entry, the n diagonal elements of the tridiagonal matrix.
32
* On exit, if INFO = 0, the eigenvalues in ascending order.
34
* E (input/output) DOUBLE PRECISION array, dimension (N-1)
35
* On entry, the (n-1) subdiagonal elements of the tridiagonal
37
* On exit, E has been destroyed.
39
* INFO (output) INTEGER
40
* = 0: successful exit
41
* < 0: if INFO = -i, the i-th argument had an illegal value
42
* > 0: the algorithm failed to find all of the eigenvalues in
43
* a total of 30*N iterations; if INFO = i, then i
44
* elements of E have not converged to zero.
46
101
* =====================================================================
48
103
* .. Parameters ..
53
108
PARAMETER ( MAXIT = 30 )
55
110
* .. Local Scalars ..
56
INTEGER I, ISCALE, JTOT, L, L1, LEND, LENDM1, LENDP1,
57
$ LENDSV, LM1, LSV, M, MM1, NM1, NMAXIT
111
INTEGER I, ISCALE, JTOT, L, L1, LEND, LENDSV, LSV, M,
58
113
DOUBLE PRECISION ALPHA, ANORM, BB, C, EPS, EPS2, GAMMA, OLDC,
59
114
$ OLDGAM, P, R, RT1, RT2, RTE, S, SAFMAX, SAFMIN,
60
$ SIGMA, SSFMAX, SSFMIN, TST
115
$ SIGMA, SSFMAX, SSFMIN, RMAX
62
117
* .. External Functions ..
63
118
DOUBLE PRECISION DLAMCH, DLANST, DLAPY2
138
188
* Scale submatrix in rows and columns L to LEND
140
ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) )
190
ANORM = DLANST( 'M', LEND-L+1, D( L ), E( L ) )
142
IF( ANORM.GT.SSFMAX ) THEN
194
IF( (ANORM.GT.SSFMAX) ) THEN
144
196
CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N,