LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
zlapll.f
Go to the documentation of this file.
1*> \brief \b ZLAPLL measures the linear dependence of two vectors.
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> \htmlonly
9*> Download ZLAPLL + dependencies
10*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlapll.f">
11*> [TGZ]</a>
12*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlapll.f">
13*> [ZIP]</a>
14*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlapll.f">
15*> [TXT]</a>
16*> \endhtmlonly
17*
18* Definition:
19* ===========
20*
21* SUBROUTINE ZLAPLL( N, X, INCX, Y, INCY, SSMIN )
22*
23* .. Scalar Arguments ..
24* INTEGER INCX, INCY, N
25* DOUBLE PRECISION SSMIN
26* ..
27* .. Array Arguments ..
28* COMPLEX*16 X( * ), Y( * )
29* ..
30*
31*
32*> \par Purpose:
33* =============
34*>
35*> \verbatim
36*>
37*> Given two column vectors X and Y, let
38*>
39*> A = ( X Y ).
40*>
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.
45*> \endverbatim
46*
47* Arguments:
48* ==========
49*
50*> \param[in] N
51*> \verbatim
52*> N is INTEGER
53*> The length of the vectors X and Y.
54*> \endverbatim
55*>
56*> \param[in,out] X
57*> \verbatim
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.
61*> \endverbatim
62*>
63*> \param[in] INCX
64*> \verbatim
65*> INCX is INTEGER
66*> The increment between successive elements of X. INCX > 0.
67*> \endverbatim
68*>
69*> \param[in,out] Y
70*> \verbatim
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.
74*> \endverbatim
75*>
76*> \param[in] INCY
77*> \verbatim
78*> INCY is INTEGER
79*> The increment between successive elements of Y. INCY > 0.
80*> \endverbatim
81*>
82*> \param[out] SSMIN
83*> \verbatim
84*> SSMIN is DOUBLE PRECISION
85*> The smallest singular value of the N-by-2 matrix A = ( X Y ).
86*> \endverbatim
87*
88* Authors:
89* ========
90*
91*> \author Univ. of Tennessee
92*> \author Univ. of California Berkeley
93*> \author Univ. of Colorado Denver
94*> \author NAG Ltd.
95*
96*> \ingroup lapll
97*
98* =====================================================================
99 SUBROUTINE zlapll( N, X, INCX, Y, INCY, SSMIN )
100*
101* -- LAPACK auxiliary routine --
102* -- LAPACK is a software package provided by Univ. of Tennessee, --
103* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
104*
105* .. Scalar Arguments ..
106 INTEGER INCX, INCY, N
107 DOUBLE PRECISION SSMIN
108* ..
109* .. Array Arguments ..
110 COMPLEX*16 X( * ), Y( * )
111* ..
112*
113* =====================================================================
114*
115* .. Parameters ..
116 DOUBLE PRECISION ZERO
117 parameter( zero = 0.0d+0 )
118 COMPLEX*16 CONE
119 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
120* ..
121* .. Local Scalars ..
122 DOUBLE PRECISION SSMAX
123 COMPLEX*16 A11, A12, A22, C, TAU
124* ..
125* .. Intrinsic Functions ..
126 INTRINSIC abs, dconjg
127* ..
128* .. External Functions ..
129 COMPLEX*16 ZDOTC
130 EXTERNAL zdotc
131* ..
132* .. External Subroutines ..
133 EXTERNAL dlas2, zaxpy, zlarfg
134* ..
135* .. Executable Statements ..
136*
137* Quick return if possible
138*
139 IF( n.LE.1 ) THEN
140 ssmin = zero
141 RETURN
142 END IF
143*
144* Compute the QR factorization of the N-by-2 matrix ( X Y )
145*
146 CALL zlarfg( n, x( 1 ), x( 1+incx ), incx, tau )
147 a11 = x( 1 )
148 x( 1 ) = cone
149*
150 c = -dconjg( tau )*zdotc( n, x, incx, y, incy )
151 CALL zaxpy( n, c, x, incx, y, incy )
152*
153 CALL zlarfg( n-1, y( 1+incy ), y( 1+2*incy ), incy, tau )
154*
155 a12 = y( 1 )
156 a22 = y( 1+incy )
157*
158* Compute the SVD of 2-by-2 Upper triangular matrix.
159*
160 CALL dlas2( abs( a11 ), abs( a12 ), abs( a22 ), ssmin, ssmax )
161*
162 RETURN
163*
164* End of ZLAPLL
165*
166 END
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
Definition zaxpy.f:88
subroutine zlapll(n, x, incx, y, incy, ssmin)
ZLAPLL measures the linear dependence of two vectors.
Definition zlapll.f:100
subroutine zlarfg(n, alpha, x, incx, tau)
ZLARFG generates an elementary reflector (Householder matrix).
Definition zlarfg.f:106
subroutine dlas2(f, g, h, ssmin, ssmax)
DLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition dlas2.f:105