1 *> \brief \b SLARRA computes the splitting points with the specified threshold.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download SLARRA + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slarra.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slarra.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slarra.f">
21 * SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
22 * NSPLIT, ISPLIT, INFO )
24 * .. Scalar Arguments ..
25 * INTEGER INFO, N, NSPLIT
28 * .. Array Arguments ..
30 * REAL D( * ), E( * ), E2( * )
39 *> Compute the splitting points with threshold SPLTOL.
40 *> SLARRA sets any "small" off-diagonal elements to zero.
49 *> The order of the matrix. N > 0.
54 *> D is REAL array, dimension (N)
55 *> On entry, the N diagonal elements of the tridiagonal
61 *> E is REAL array, dimension (N)
62 *> On entry, the first (N-1) entries contain the subdiagonal
63 *> elements of the tridiagonal matrix T; E(N) need not be set.
64 *> On exit, the entries E( ISPLIT( I ) ), 1 <= I <= NSPLIT,
65 *> are set to zero, the other entries of E are untouched.
70 *> E2 is REAL array, dimension (N)
71 *> On entry, the first (N-1) entries contain the SQUARES of the
72 *> subdiagonal elements of the tridiagonal matrix T;
73 *> E2(N) need not be set.
74 *> On exit, the entries E2( ISPLIT( I ) ),
75 *> 1 <= I <= NSPLIT, have been set to zero
81 *> The threshold for splitting. Two criteria can be used:
82 *> SPLTOL<0 : criterion based on absolute off-diagonal value
83 *> SPLTOL>0 : criterion that preserves relative accuracy
89 *> The norm of the matrix.
95 *> The number of blocks T splits into. 1 <= NSPLIT <= N.
100 *> ISPLIT is INTEGER array, dimension (N)
101 *> The splitting points, at which T breaks up into blocks.
102 *> The first block consists of rows/columns 1 to ISPLIT(1),
103 *> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
104 *> etc., and the NSPLIT-th consists of rows/columns
105 *> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
111 *> = 0: successful exit
117 *> \author Univ. of Tennessee
118 *> \author Univ. of California Berkeley
119 *> \author Univ. of Colorado Denver
122 *> \date September 2012
124 *> \ingroup auxOTHERauxiliary
126 *> \par Contributors:
129 *> Beresford Parlett, University of California, Berkeley, USA \n
130 *> Jim Demmel, University of California, Berkeley, USA \n
131 *> Inderjit Dhillon, University of Texas, Austin, USA \n
132 *> Osni Marques, LBNL/NERSC, USA \n
133 *> Christof Voemel, University of California, Berkeley, USA
135 * =====================================================================
136 SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
137 $ NSPLIT, ISPLIT, INFO )
139 * -- LAPACK auxiliary routine (version 3.4.2) --
140 * -- LAPACK is a software package provided by Univ. of Tennessee, --
141 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
144 * .. Scalar Arguments ..
145 INTEGER INFO, N, NSPLIT
148 * .. Array Arguments ..
150 REAL D( * ), E( * ), E2( * )
153 * =====================================================================
157 PARAMETER ( ZERO = 0.0E0 )
159 * .. Local Scalars ..
164 * .. Intrinsic Functions ..
167 * .. Executable Statements ..
171 * Compute splitting points
173 IF(SPLTOL.LT.ZERO) THEN
174 * Criterion based on absolute off-diagonal value
175 TMP1 = ABS(SPLTOL)* TNRM
178 IF( EABS .LE. TMP1) THEN
186 * Criterion that guarantees relative accuracy
189 IF( EABS .LE. SPLTOL * SQRT(ABS(D(I)))*SQRT(ABS(D(I+1))) )