version 1.6, 2010/08/07 13:22:20
|
version 1.21, 2023/08/07 08:38:57
|
Line 1
|
Line 1
|
|
*> \brief \b DLARRJ performs refinement of the initial estimates of the eigenvalues of the matrix T. |
|
* |
|
* =========== DOCUMENTATION =========== |
|
* |
|
* Online html documentation available at |
|
* http://www.netlib.org/lapack/explore-html/ |
|
* |
|
*> \htmlonly |
|
*> Download DLARRJ + dependencies |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrj.f"> |
|
*> [TGZ]</a> |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrj.f"> |
|
*> [ZIP]</a> |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrj.f"> |
|
*> [TXT]</a> |
|
*> \endhtmlonly |
|
* |
|
* Definition: |
|
* =========== |
|
* |
|
* SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST, |
|
* RTOL, OFFSET, W, WERR, WORK, IWORK, |
|
* PIVMIN, SPDIAM, INFO ) |
|
* |
|
* .. Scalar Arguments .. |
|
* INTEGER IFIRST, ILAST, INFO, N, OFFSET |
|
* DOUBLE PRECISION PIVMIN, RTOL, SPDIAM |
|
* .. |
|
* .. Array Arguments .. |
|
* INTEGER IWORK( * ) |
|
* DOUBLE PRECISION D( * ), E2( * ), W( * ), |
|
* $ WERR( * ), WORK( * ) |
|
* .. |
|
* |
|
* |
|
*> \par Purpose: |
|
* ============= |
|
*> |
|
*> \verbatim |
|
*> |
|
*> Given the initial eigenvalue approximations of T, DLARRJ |
|
*> does bisection to refine the eigenvalues of T, |
|
*> W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial |
|
*> guesses for these eigenvalues are input in W, the corresponding estimate |
|
*> of the error in these guesses in WERR. During bisection, intervals |
|
*> [left, right] are maintained by storing their mid-points and |
|
*> semi-widths in the arrays W and WERR respectively. |
|
*> \endverbatim |
|
* |
|
* Arguments: |
|
* ========== |
|
* |
|
*> \param[in] N |
|
*> \verbatim |
|
*> N is INTEGER |
|
*> The order of the matrix. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] D |
|
*> \verbatim |
|
*> D is DOUBLE PRECISION array, dimension (N) |
|
*> The N diagonal elements of T. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] E2 |
|
*> \verbatim |
|
*> E2 is DOUBLE PRECISION array, dimension (N-1) |
|
*> The Squares of the (N-1) subdiagonal elements of T. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] IFIRST |
|
*> \verbatim |
|
*> IFIRST is INTEGER |
|
*> The index of the first eigenvalue to be computed. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] ILAST |
|
*> \verbatim |
|
*> ILAST is INTEGER |
|
*> The index of the last eigenvalue to be computed. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] RTOL |
|
*> \verbatim |
|
*> RTOL is DOUBLE PRECISION |
|
*> Tolerance for the convergence of the bisection intervals. |
|
*> An interval [LEFT,RIGHT] has converged if |
|
*> RIGHT-LEFT < RTOL*MAX(|LEFT|,|RIGHT|). |
|
*> \endverbatim |
|
*> |
|
*> \param[in] OFFSET |
|
*> \verbatim |
|
*> OFFSET is INTEGER |
|
*> Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET |
|
*> through ILAST-OFFSET elements of these arrays are to be used. |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] W |
|
*> \verbatim |
|
*> W is DOUBLE PRECISION array, dimension (N) |
|
*> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are |
|
*> estimates of the eigenvalues of L D L^T indexed IFIRST through |
|
*> ILAST. |
|
*> On output, these estimates are refined. |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] WERR |
|
*> \verbatim |
|
*> WERR is DOUBLE PRECISION array, dimension (N) |
|
*> On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are |
|
*> the errors in the estimates of the corresponding elements in W. |
|
*> On output, these errors are refined. |
|
*> \endverbatim |
|
*> |
|
*> \param[out] WORK |
|
*> \verbatim |
|
*> WORK is DOUBLE PRECISION array, dimension (2*N) |
|
*> Workspace. |
|
*> \endverbatim |
|
*> |
|
*> \param[out] IWORK |
|
*> \verbatim |
|
*> IWORK is INTEGER array, dimension (2*N) |
|
*> Workspace. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] PIVMIN |
|
*> \verbatim |
|
*> PIVMIN is DOUBLE PRECISION |
|
*> The minimum pivot in the Sturm sequence for T. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] SPDIAM |
|
*> \verbatim |
|
*> SPDIAM is DOUBLE PRECISION |
|
*> The spectral diameter of T. |
|
*> \endverbatim |
|
*> |
|
*> \param[out] INFO |
|
*> \verbatim |
|
*> INFO is INTEGER |
|
*> Error flag. |
|
*> \endverbatim |
|
* |
|
* Authors: |
|
* ======== |
|
* |
|
*> \author Univ. of Tennessee |
|
*> \author Univ. of California Berkeley |
|
*> \author Univ. of Colorado Denver |
|
*> \author NAG Ltd. |
|
* |
|
*> \ingroup OTHERauxiliary |
|
* |
|
*> \par Contributors: |
|
* ================== |
|
*> |
|
*> Beresford Parlett, University of California, Berkeley, USA \n |
|
*> Jim Demmel, University of California, Berkeley, USA \n |
|
*> Inderjit Dhillon, University of Texas, Austin, USA \n |
|
*> Osni Marques, LBNL/NERSC, USA \n |
|
*> Christof Voemel, University of California, Berkeley, USA |
|
* |
|
* ===================================================================== |
SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST, |
SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST, |
$ RTOL, OFFSET, W, WERR, WORK, IWORK, |
$ RTOL, OFFSET, W, WERR, WORK, IWORK, |
$ PIVMIN, SPDIAM, INFO ) |
$ PIVMIN, SPDIAM, INFO ) |
* |
* |
* -- LAPACK auxiliary routine (version 3.2.2) -- |
* -- LAPACK auxiliary routine -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* June 2010 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER IFIRST, ILAST, INFO, N, OFFSET |
INTEGER IFIRST, ILAST, INFO, N, OFFSET |
Line 17
|
Line 180
|
$ WERR( * ), WORK( * ) |
$ WERR( * ), WORK( * ) |
* .. |
* .. |
* |
* |
* Purpose |
|
* ======= |
|
* |
|
* Given the initial eigenvalue approximations of T, DLARRJ |
|
* does bisection to refine the eigenvalues of T, |
|
* W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial |
|
* guesses for these eigenvalues are input in W, the corresponding estimate |
|
* of the error in these guesses in WERR. During bisection, intervals |
|
* [left, right] are maintained by storing their mid-points and |
|
* semi-widths in the arrays W and WERR respectively. |
|
* |
|
* Arguments |
|
* ========= |
|
* |
|
* N (input) INTEGER |
|
* The order of the matrix. |
|
* |
|
* D (input) DOUBLE PRECISION array, dimension (N) |
|
* The N diagonal elements of T. |
|
* |
|
* E2 (input) DOUBLE PRECISION array, dimension (N-1) |
|
* The Squares of the (N-1) subdiagonal elements of T. |
|
* |
|
* IFIRST (input) INTEGER |
|
* The index of the first eigenvalue to be computed. |
|
* |
|
* ILAST (input) INTEGER |
|
* The index of the last eigenvalue to be computed. |
|
* |
|
* RTOL (input) DOUBLE PRECISION |
|
* Tolerance for the convergence of the bisection intervals. |
|
* An interval [LEFT,RIGHT] has converged if |
|
* RIGHT-LEFT.LT.RTOL*MAX(|LEFT|,|RIGHT|). |
|
* |
|
* OFFSET (input) INTEGER |
|
* Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET |
|
* through ILAST-OFFSET elements of these arrays are to be used. |
|
* |
|
* W (input/output) DOUBLE PRECISION array, dimension (N) |
|
* On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are |
|
* estimates of the eigenvalues of L D L^T indexed IFIRST through |
|
* ILAST. |
|
* On output, these estimates are refined. |
|
* |
|
* WERR (input/output) DOUBLE PRECISION array, dimension (N) |
|
* On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are |
|
* the errors in the estimates of the corresponding elements in W. |
|
* On output, these errors are refined. |
|
* |
|
* WORK (workspace) DOUBLE PRECISION array, dimension (2*N) |
|
* Workspace. |
|
* |
|
* IWORK (workspace) INTEGER array, dimension (2*N) |
|
* Workspace. |
|
* |
|
* PIVMIN (input) DOUBLE PRECISION |
|
* The minimum pivot in the Sturm sequence for T. |
|
* |
|
* SPDIAM (input) DOUBLE PRECISION |
|
* The spectral diameter of T. |
|
* |
|
* INFO (output) INTEGER |
|
* Error flag. |
|
* |
|
* Further Details |
|
* =============== |
|
* |
|
* Based on contributions by |
|
* Beresford Parlett, University of California, Berkeley, USA |
|
* Jim Demmel, University of California, Berkeley, USA |
|
* Inderjit Dhillon, University of Texas, Austin, USA |
|
* Osni Marques, LBNL/NERSC, USA |
|
* Christof Voemel, University of California, Berkeley, USA |
|
* |
|
* ===================================================================== |
* ===================================================================== |
* |
* |
* .. Parameters .. |
* .. Parameters .. |
Line 112
|
Line 201
|
* |
* |
INFO = 0 |
INFO = 0 |
* |
* |
|
* Quick return if possible |
|
* |
|
IF( N.LE.0 ) THEN |
|
RETURN |
|
END IF |
|
* |
MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) / |
MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) / |
$ LOG( TWO ) ) + 2 |
$ LOG( TWO ) ) + 2 |
* |
* |