![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b DLAPLL 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download DLAPLL + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapll.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapll.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapll.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN ) 00022 * 00023 * .. Scalar Arguments .. 00024 * INTEGER INCX, INCY, N 00025 * DOUBLE PRECISION SSMIN 00026 * .. 00027 * .. Array Arguments .. 00028 * DOUBLE PRECISION X( * ), Y( * ) 00029 * .. 00030 * 00031 * 00032 *> \par Purpose: 00033 * ============= 00034 *> 00035 *> \verbatim 00036 *> 00037 *> Given two column vectors X and Y, let 00038 *> 00039 *> A = ( X Y ). 00040 *> 00041 *> The subroutine first computes the QR factorization of A = Q*R, 00042 *> and then computes the SVD of the 2-by-2 upper triangular matrix R. 00043 *> The smaller singular value of R is returned in SSMIN, which is used 00044 *> as the measurement of the linear dependency of the vectors X and Y. 00045 *> \endverbatim 00046 * 00047 * Arguments: 00048 * ========== 00049 * 00050 *> \param[in] N 00051 *> \verbatim 00052 *> N is INTEGER 00053 *> The length of the vectors X and Y. 00054 *> \endverbatim 00055 *> 00056 *> \param[in,out] X 00057 *> \verbatim 00058 *> X is DOUBLE PRECISION array, 00059 *> dimension (1+(N-1)*INCX) 00060 *> On entry, X contains the N-vector X. 00061 *> On exit, X is overwritten. 00062 *> \endverbatim 00063 *> 00064 *> \param[in] INCX 00065 *> \verbatim 00066 *> INCX is INTEGER 00067 *> The increment between successive elements of X. INCX > 0. 00068 *> \endverbatim 00069 *> 00070 *> \param[in,out] Y 00071 *> \verbatim 00072 *> Y is DOUBLE PRECISION array, 00073 *> dimension (1+(N-1)*INCY) 00074 *> On entry, Y contains the N-vector Y. 00075 *> On exit, Y is overwritten. 00076 *> \endverbatim 00077 *> 00078 *> \param[in] INCY 00079 *> \verbatim 00080 *> INCY is INTEGER 00081 *> The increment between successive elements of Y. INCY > 0. 00082 *> \endverbatim 00083 *> 00084 *> \param[out] SSMIN 00085 *> \verbatim 00086 *> SSMIN is DOUBLE PRECISION 00087 *> The smallest singular value of the N-by-2 matrix A = ( X Y ). 00088 *> \endverbatim 00089 * 00090 * Authors: 00091 * ======== 00092 * 00093 *> \author Univ. of Tennessee 00094 *> \author Univ. of California Berkeley 00095 *> \author Univ. of Colorado Denver 00096 *> \author NAG Ltd. 00097 * 00098 *> \date November 2011 00099 * 00100 *> \ingroup doubleOTHERauxiliary 00101 * 00102 * ===================================================================== 00103 SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN ) 00104 * 00105 * -- LAPACK auxiliary routine (version 3.4.0) -- 00106 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00107 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00108 * November 2011 00109 * 00110 * .. Scalar Arguments .. 00111 INTEGER INCX, INCY, N 00112 DOUBLE PRECISION SSMIN 00113 * .. 00114 * .. Array Arguments .. 00115 DOUBLE PRECISION X( * ), Y( * ) 00116 * .. 00117 * 00118 * ===================================================================== 00119 * 00120 * .. Parameters .. 00121 DOUBLE PRECISION ZERO, ONE 00122 PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) 00123 * .. 00124 * .. Local Scalars .. 00125 DOUBLE PRECISION A11, A12, A22, C, SSMAX, TAU 00126 * .. 00127 * .. External Functions .. 00128 DOUBLE PRECISION DDOT 00129 EXTERNAL DDOT 00130 * .. 00131 * .. External Subroutines .. 00132 EXTERNAL DAXPY, DLARFG, DLAS2 00133 * .. 00134 * .. Executable Statements .. 00135 * 00136 * Quick return if possible 00137 * 00138 IF( N.LE.1 ) THEN 00139 SSMIN = ZERO 00140 RETURN 00141 END IF 00142 * 00143 * Compute the QR factorization of the N-by-2 matrix ( X Y ) 00144 * 00145 CALL DLARFG( N, X( 1 ), X( 1+INCX ), INCX, TAU ) 00146 A11 = X( 1 ) 00147 X( 1 ) = ONE 00148 * 00149 C = -TAU*DDOT( N, X, INCX, Y, INCY ) 00150 CALL DAXPY( N, C, X, INCX, Y, INCY ) 00151 * 00152 CALL DLARFG( N-1, Y( 1+INCY ), Y( 1+2*INCY ), INCY, TAU ) 00153 * 00154 A12 = Y( 1 ) 00155 A22 = Y( 1+INCY ) 00156 * 00157 * Compute the SVD of 2-by-2 Upper triangular matrix. 00158 * 00159 CALL DLAS2( A11, A12, A22, SSMIN, SSMAX ) 00160 * 00161 RETURN 00162 * 00163 * End of DLAPLL 00164 * 00165 END