LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ zlapll()

subroutine zlapll ( integer n,
complex*16, dimension( * ) x,
integer incx,
complex*16, dimension( * ) y,
integer incy,
double precision ssmin )

ZLAPLL measures the linear dependence of two vectors.

Download ZLAPLL + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> Given two column vectors X and Y, let
!>
!>                      A = ( X Y ).
!>
!> The subroutine first computes the QR factorization of A = Q*R,
!> and then computes the SVD of the 2-by-2 upper triangular matrix R.
!> The smaller singular value of R is returned in SSMIN, which is used
!> as the measurement of the linear dependency of the vectors X and Y.
!> 
Parameters
[in]N
!>          N is INTEGER
!>          The length of the vectors X and Y.
!> 
[in,out]X
!>          X is COMPLEX*16 array, dimension (1+(N-1)*INCX)
!>          On entry, X contains the N-vector X.
!>          On exit, X is overwritten.
!> 
[in]INCX
!>          INCX is INTEGER
!>          The increment between successive elements of X. INCX > 0.
!> 
[in,out]Y
!>          Y is COMPLEX*16 array, dimension (1+(N-1)*INCY)
!>          On entry, Y contains the N-vector Y.
!>          On exit, Y is overwritten.
!> 
[in]INCY
!>          INCY is INTEGER
!>          The increment between successive elements of Y. INCY > 0.
!> 
[out]SSMIN
!>          SSMIN is DOUBLE PRECISION
!>          The smallest singular value of the N-by-2 matrix A = ( X Y ).
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 97 of file zlapll.f.

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*
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
Definition zaxpy.f:88
complex *16 function zdotc(n, zx, incx, zy, incy)
ZDOTC
Definition zdotc.f:83
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
Here is the call graph for this function:
Here is the caller graph for this function: