LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
zlapll.f
Go to the documentation of this file.
00001 *> \brief \b ZLAPLL
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download ZLAPLL + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlapll.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlapll.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlapll.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE ZLAPLL( N, X, INCX, Y, INCY, SSMIN )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       INTEGER            INCX, INCY, N
00025 *       DOUBLE PRECISION   SSMIN
00026 *       ..
00027 *       .. Array Arguments ..
00028 *       COMPLEX*16         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 COMPLEX*16 array, dimension (1+(N-1)*INCX)
00059 *>          On entry, X contains the N-vector X.
00060 *>          On exit, X is overwritten.
00061 *> \endverbatim
00062 *>
00063 *> \param[in] INCX
00064 *> \verbatim
00065 *>          INCX is INTEGER
00066 *>          The increment between successive elements of X. INCX > 0.
00067 *> \endverbatim
00068 *>
00069 *> \param[in,out] Y
00070 *> \verbatim
00071 *>          Y is COMPLEX*16 array, dimension (1+(N-1)*INCY)
00072 *>          On entry, Y contains the N-vector Y.
00073 *>          On exit, Y is overwritten.
00074 *> \endverbatim
00075 *>
00076 *> \param[in] INCY
00077 *> \verbatim
00078 *>          INCY is INTEGER
00079 *>          The increment between successive elements of Y. INCY > 0.
00080 *> \endverbatim
00081 *>
00082 *> \param[out] SSMIN
00083 *> \verbatim
00084 *>          SSMIN is DOUBLE PRECISION
00085 *>          The smallest singular value of the N-by-2 matrix A = ( X Y ).
00086 *> \endverbatim
00087 *
00088 *  Authors:
00089 *  ========
00090 *
00091 *> \author Univ. of Tennessee 
00092 *> \author Univ. of California Berkeley 
00093 *> \author Univ. of Colorado Denver 
00094 *> \author NAG Ltd. 
00095 *
00096 *> \date November 2011
00097 *
00098 *> \ingroup complex16OTHERauxiliary
00099 *
00100 *  =====================================================================
00101       SUBROUTINE ZLAPLL( N, X, INCX, Y, INCY, SSMIN )
00102 *
00103 *  -- LAPACK auxiliary routine (version 3.4.0) --
00104 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00105 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00106 *     November 2011
00107 *
00108 *     .. Scalar Arguments ..
00109       INTEGER            INCX, INCY, N
00110       DOUBLE PRECISION   SSMIN
00111 *     ..
00112 *     .. Array Arguments ..
00113       COMPLEX*16         X( * ), Y( * )
00114 *     ..
00115 *
00116 *  =====================================================================
00117 *
00118 *     .. Parameters ..
00119       DOUBLE PRECISION   ZERO
00120       PARAMETER          ( ZERO = 0.0D+0 )
00121       COMPLEX*16         CONE
00122       PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
00123 *     ..
00124 *     .. Local Scalars ..
00125       DOUBLE PRECISION   SSMAX
00126       COMPLEX*16         A11, A12, A22, C, TAU
00127 *     ..
00128 *     .. Intrinsic Functions ..
00129       INTRINSIC          ABS, DCONJG
00130 *     ..
00131 *     .. External Functions ..
00132       COMPLEX*16         ZDOTC
00133       EXTERNAL           ZDOTC
00134 *     ..
00135 *     .. External Subroutines ..
00136       EXTERNAL           DLAS2, ZAXPY, ZLARFG
00137 *     ..
00138 *     .. Executable Statements ..
00139 *
00140 *     Quick return if possible
00141 *
00142       IF( N.LE.1 ) THEN
00143          SSMIN = ZERO
00144          RETURN
00145       END IF
00146 *
00147 *     Compute the QR factorization of the N-by-2 matrix ( X Y )
00148 *
00149       CALL ZLARFG( N, X( 1 ), X( 1+INCX ), INCX, TAU )
00150       A11 = X( 1 )
00151       X( 1 ) = CONE
00152 *
00153       C = -DCONJG( TAU )*ZDOTC( N, X, INCX, Y, INCY )
00154       CALL ZAXPY( N, C, X, INCX, Y, INCY )
00155 *
00156       CALL ZLARFG( N-1, Y( 1+INCY ), Y( 1+2*INCY ), INCY, TAU )
00157 *
00158       A12 = Y( 1 )
00159       A22 = Y( 1+INCY )
00160 *
00161 *     Compute the SVD of 2-by-2 Upper triangular matrix.
00162 *
00163       CALL DLAS2( ABS( A11 ), ABS( A12 ), ABS( A22 ), SSMIN, SSMAX )
00164 *
00165       RETURN
00166 *
00167 *     End of ZLAPLL
00168 *
00169       END
 All Files Functions