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