1 *> \brief \b ZLAPLL measures the linear dependence of two vectors.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZLAPLL + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlapll.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlapll.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlapll.f">
21 * SUBROUTINE ZLAPLL( N, X, INCX, Y, INCY, SSMIN )
23 * .. Scalar Arguments ..
24 * INTEGER INCX, INCY, N
25 * DOUBLE PRECISION SSMIN
27 * .. Array Arguments ..
28 * COMPLEX*16 X( * ), Y( * )
37 *> Given two column vectors X and Y, let
41 *> The subroutine first computes the QR factorization of A = Q*R,
42 *> and then computes the SVD of the 2-by-2 upper triangular matrix R.
43 *> The smaller singular value of R is returned in SSMIN, which is used
44 *> as the measurement of the linear dependency of the vectors X and Y.
53 *> The length of the vectors X and Y.
58 *> X is COMPLEX*16 array, dimension (1+(N-1)*INCX)
59 *> On entry, X contains the N-vector X.
60 *> On exit, X is overwritten.
66 *> The increment between successive elements of X. INCX > 0.
71 *> Y is COMPLEX*16 array, dimension (1+(N-1)*INCY)
72 *> On entry, Y contains the N-vector Y.
73 *> On exit, Y is overwritten.
79 *> The increment between successive elements of Y. INCY > 0.
84 *> SSMIN is DOUBLE PRECISION
85 *> The smallest singular value of the N-by-2 matrix A = ( X Y ).
91 *> \author Univ. of Tennessee
92 *> \author Univ. of California Berkeley
93 *> \author Univ. of Colorado Denver
96 *> \date September 2012
98 *> \ingroup complex16OTHERauxiliary
100 * =====================================================================
101 SUBROUTINE ZLAPLL( N, X, INCX, Y, INCY, SSMIN )
103 * -- LAPACK auxiliary routine (version 3.4.2) --
104 * -- LAPACK is a software package provided by Univ. of Tennessee, --
105 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
108 * .. Scalar Arguments ..
109 INTEGER INCX, INCY, N
110 DOUBLE PRECISION SSMIN
112 * .. Array Arguments ..
113 COMPLEX*16 X( * ), Y( * )
116 * =====================================================================
119 DOUBLE PRECISION ZERO
120 PARAMETER ( ZERO = 0.0D+0 )
122 PARAMETER ( CONE = ( 1.0D+0, 0.0D+0 ) )
124 * .. Local Scalars ..
125 DOUBLE PRECISION SSMAX
126 COMPLEX*16 A11, A12, A22, C, TAU
128 * .. Intrinsic Functions ..
129 INTRINSIC ABS, DCONJG
131 * .. External Functions ..
135 * .. External Subroutines ..
136 EXTERNAL DLAS2, ZAXPY, ZLARFG
138 * .. Executable Statements ..
140 * Quick return if possible
147 * Compute the QR factorization of the N-by-2 matrix ( X Y )
149 CALL ZLARFG( N, X( 1 ), X( 1+INCX ), INCX, TAU )
153 C = -DCONJG( TAU )*ZDOTC( N, X, INCX, Y, INCY )
154 CALL ZAXPY( N, C, X, INCX, Y, INCY )
156 CALL ZLARFG( N-1, Y( 1+INCY ), Y( 1+2*INCY ), INCY, TAU )
161 * Compute the SVD of 2-by-2 Upper triangular matrix.
163 CALL DLAS2( ABS( A11 ), ABS( A12 ), ABS( A22 ), SSMIN, SSMAX )