version 1.3, 2010/08/06 15:28:42
|
version 1.23, 2023/08/07 08:38:57
|
Line 1
|
Line 1
|
|
*> \brief \b DLARRF finds a new relatively robust representation such that at least one of the eigenvalues is relatively isolated. |
|
* |
|
* =========== DOCUMENTATION =========== |
|
* |
|
* Online html documentation available at |
|
* http://www.netlib.org/lapack/explore-html/ |
|
* |
|
*> \htmlonly |
|
*> Download DLARRF + dependencies |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrf.f"> |
|
*> [TGZ]</a> |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrf.f"> |
|
*> [ZIP]</a> |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrf.f"> |
|
*> [TXT]</a> |
|
*> \endhtmlonly |
|
* |
|
* Definition: |
|
* =========== |
|
* |
|
* SUBROUTINE DLARRF( N, D, L, LD, CLSTRT, CLEND, |
|
* W, WGAP, WERR, |
|
* SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA, |
|
* DPLUS, LPLUS, WORK, INFO ) |
|
* |
|
* .. Scalar Arguments .. |
|
* INTEGER CLSTRT, CLEND, INFO, N |
|
* DOUBLE PRECISION CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM |
|
* .. |
|
* .. Array Arguments .. |
|
* DOUBLE PRECISION D( * ), DPLUS( * ), L( * ), LD( * ), |
|
* $ LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * ) |
|
* .. |
|
* |
|
* |
|
*> \par Purpose: |
|
* ============= |
|
*> |
|
*> \verbatim |
|
*> |
|
*> Given the initial representation L D L^T and its cluster of close |
|
*> eigenvalues (in a relative measure), W( CLSTRT ), W( CLSTRT+1 ), ... |
|
*> W( CLEND ), DLARRF finds a new relatively robust representation |
|
*> L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the |
|
*> eigenvalues of L(+) D(+) L(+)^T is relatively isolated. |
|
*> \endverbatim |
|
* |
|
* Arguments: |
|
* ========== |
|
* |
|
*> \param[in] N |
|
*> \verbatim |
|
*> N is INTEGER |
|
*> The order of the matrix (subblock, if the matrix split). |
|
*> \endverbatim |
|
*> |
|
*> \param[in] D |
|
*> \verbatim |
|
*> D is DOUBLE PRECISION array, dimension (N) |
|
*> The N diagonal elements of the diagonal matrix D. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] L |
|
*> \verbatim |
|
*> L is DOUBLE PRECISION array, dimension (N-1) |
|
*> The (N-1) subdiagonal elements of the unit bidiagonal |
|
*> matrix L. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] LD |
|
*> \verbatim |
|
*> LD is DOUBLE PRECISION array, dimension (N-1) |
|
*> The (N-1) elements L(i)*D(i). |
|
*> \endverbatim |
|
*> |
|
*> \param[in] CLSTRT |
|
*> \verbatim |
|
*> CLSTRT is INTEGER |
|
*> The index of the first eigenvalue in the cluster. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] CLEND |
|
*> \verbatim |
|
*> CLEND is INTEGER |
|
*> The index of the last eigenvalue in the cluster. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] W |
|
*> \verbatim |
|
*> W is DOUBLE PRECISION array, dimension |
|
*> dimension is >= (CLEND-CLSTRT+1) |
|
*> The eigenvalue APPROXIMATIONS of L D L^T in ascending order. |
|
*> W( CLSTRT ) through W( CLEND ) form the cluster of relatively |
|
*> close eigenalues. |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] WGAP |
|
*> \verbatim |
|
*> WGAP is DOUBLE PRECISION array, dimension |
|
*> dimension is >= (CLEND-CLSTRT+1) |
|
*> The separation from the right neighbor eigenvalue in W. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] WERR |
|
*> \verbatim |
|
*> WERR is DOUBLE PRECISION array, dimension |
|
*> dimension is >= (CLEND-CLSTRT+1) |
|
*> WERR contain the semiwidth of the uncertainty |
|
*> interval of the corresponding eigenvalue APPROXIMATION in W |
|
*> \endverbatim |
|
*> |
|
*> \param[in] SPDIAM |
|
*> \verbatim |
|
*> SPDIAM is DOUBLE PRECISION |
|
*> estimate of the spectral diameter obtained from the |
|
*> Gerschgorin intervals |
|
*> \endverbatim |
|
*> |
|
*> \param[in] CLGAPL |
|
*> \verbatim |
|
*> CLGAPL is DOUBLE PRECISION |
|
*> \endverbatim |
|
*> |
|
*> \param[in] CLGAPR |
|
*> \verbatim |
|
*> CLGAPR is DOUBLE PRECISION |
|
*> absolute gap on each end of the cluster. |
|
*> Set by the calling routine to protect against shifts too close |
|
*> to eigenvalues outside the cluster. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] PIVMIN |
|
*> \verbatim |
|
*> PIVMIN is DOUBLE PRECISION |
|
*> The minimum pivot allowed in the Sturm sequence. |
|
*> \endverbatim |
|
*> |
|
*> \param[out] SIGMA |
|
*> \verbatim |
|
*> SIGMA is DOUBLE PRECISION |
|
*> The shift used to form L(+) D(+) L(+)^T. |
|
*> \endverbatim |
|
*> |
|
*> \param[out] DPLUS |
|
*> \verbatim |
|
*> DPLUS is DOUBLE PRECISION array, dimension (N) |
|
*> The N diagonal elements of the diagonal matrix D(+). |
|
*> \endverbatim |
|
*> |
|
*> \param[out] LPLUS |
|
*> \verbatim |
|
*> LPLUS is DOUBLE PRECISION array, dimension (N-1) |
|
*> The first (N-1) elements of LPLUS contain the subdiagonal |
|
*> elements of the unit bidiagonal matrix L(+). |
|
*> \endverbatim |
|
*> |
|
*> \param[out] WORK |
|
*> \verbatim |
|
*> WORK is DOUBLE PRECISION array, dimension (2*N) |
|
*> Workspace. |
|
*> \endverbatim |
|
*> |
|
*> \param[out] INFO |
|
*> \verbatim |
|
*> INFO is INTEGER |
|
*> Signals processing OK (=0) or failure (=1) |
|
*> \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 DLARRF( N, D, L, LD, CLSTRT, CLEND, |
SUBROUTINE DLARRF( N, D, L, LD, CLSTRT, CLEND, |
$ W, WGAP, WERR, |
$ W, WGAP, WERR, |
$ SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA, |
$ SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA, |
$ DPLUS, LPLUS, WORK, INFO ) |
$ DPLUS, LPLUS, WORK, INFO ) |
* |
* |
* -- LAPACK auxiliary routine (version 3.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..-- |
* November 2006 |
* |
** |
|
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER CLSTRT, CLEND, INFO, N |
INTEGER CLSTRT, CLEND, INFO, N |
DOUBLE PRECISION CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM |
DOUBLE PRECISION CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM |
Line 17
|
Line 204
|
$ LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * ) |
$ LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * ) |
* .. |
* .. |
* |
* |
* Purpose |
|
* ======= |
|
* |
|
* Given the initial representation L D L^T and its cluster of close |
|
* eigenvalues (in a relative measure), W( CLSTRT ), W( CLSTRT+1 ), ... |
|
* W( CLEND ), DLARRF finds a new relatively robust representation |
|
* L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the |
|
* eigenvalues of L(+) D(+) L(+)^T is relatively isolated. |
|
* |
|
* Arguments |
|
* ========= |
|
* |
|
* N (input) INTEGER |
|
* The order of the matrix (subblock, if the matrix splitted). |
|
* |
|
* D (input) DOUBLE PRECISION array, dimension (N) |
|
* The N diagonal elements of the diagonal matrix D. |
|
* |
|
* L (input) DOUBLE PRECISION array, dimension (N-1) |
|
* The (N-1) subdiagonal elements of the unit bidiagonal |
|
* matrix L. |
|
* |
|
* LD (input) DOUBLE PRECISION array, dimension (N-1) |
|
* The (N-1) elements L(i)*D(i). |
|
* |
|
* CLSTRT (input) INTEGER |
|
* The index of the first eigenvalue in the cluster. |
|
* |
|
* CLEND (input) INTEGER |
|
* The index of the last eigenvalue in the cluster. |
|
* |
|
* W (input) DOUBLE PRECISION array, dimension >= (CLEND-CLSTRT+1) |
|
* The eigenvalue APPROXIMATIONS of L D L^T in ascending order. |
|
* W( CLSTRT ) through W( CLEND ) form the cluster of relatively |
|
* close eigenalues. |
|
* |
|
* WGAP (input/output) DOUBLE PRECISION array, dimension >= (CLEND-CLSTRT+1) |
|
* The separation from the right neighbor eigenvalue in W. |
|
* |
|
* WERR (input) DOUBLE PRECISION array, dimension >= (CLEND-CLSTRT+1) |
|
* WERR contain the semiwidth of the uncertainty |
|
* interval of the corresponding eigenvalue APPROXIMATION in W |
|
* |
|
* SPDIAM (input) estimate of the spectral diameter obtained from the |
|
* Gerschgorin intervals |
|
* |
|
* CLGAPL, CLGAPR (input) absolute gap on each end of the cluster. |
|
* Set by the calling routine to protect against shifts too close |
|
* to eigenvalues outside the cluster. |
|
* |
|
* PIVMIN (input) DOUBLE PRECISION |
|
* The minimum pivot allowed in the Sturm sequence. |
|
* |
|
* SIGMA (output) DOUBLE PRECISION |
|
* The shift used to form L(+) D(+) L(+)^T. |
|
* |
|
* DPLUS (output) DOUBLE PRECISION array, dimension (N) |
|
* The N diagonal elements of the diagonal matrix D(+). |
|
* |
|
* LPLUS (output) DOUBLE PRECISION array, dimension (N-1) |
|
* The first (N-1) elements of LPLUS contain the subdiagonal |
|
* elements of the unit bidiagonal matrix L(+). |
|
* |
|
* WORK (workspace) DOUBLE PRECISION array, dimension (2*N) |
|
* Workspace. |
|
* |
|
* 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 .. |
DOUBLE PRECISION FOUR, MAXGROWTH1, MAXGROWTH2, ONE, QUART, TWO, |
DOUBLE PRECISION FOUR, MAXGROWTH1, MAXGROWTH2, ONE, QUART, TWO |
$ ZERO |
PARAMETER ( ONE = 1.0D0, TWO = 2.0D0, FOUR = 4.0D0, |
PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0, |
$ QUART = 0.25D0, |
$ FOUR = 4.0D0, QUART = 0.25D0, |
|
$ MAXGROWTH1 = 8.D0, |
$ MAXGROWTH1 = 8.D0, |
$ MAXGROWTH2 = 8.D0 ) |
$ MAXGROWTH2 = 8.D0 ) |
* .. |
* .. |
Line 126
|
Line 236
|
* .. Executable Statements .. |
* .. Executable Statements .. |
* |
* |
INFO = 0 |
INFO = 0 |
|
* |
|
* Quick return if possible |
|
* |
|
IF( N.LE.0 ) THEN |
|
RETURN |
|
END IF |
|
* |
FACT = DBLE(2**KTRYMAX) |
FACT = DBLE(2**KTRYMAX) |
EPS = DLAMCH( 'Precision' ) |
EPS = DLAMCH( 'Precision' ) |
SHIFT = 0 |
SHIFT = 0 |
Line 144
|
Line 261
|
|
|
* Decide whether the code should accept the best among all |
* Decide whether the code should accept the best among all |
* representations despite large element growth or signal INFO=1 |
* representations despite large element growth or signal INFO=1 |
NOFAIL = .TRUE. |
* Setting NOFAIL to .FALSE. for quick fix for bug 113 |
|
NOFAIL = .FALSE. |
* |
* |
|
|
* Compute the average gap length of the cluster |
* Compute the average gap length of the cluster |