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

◆ clapll()

subroutine clapll ( integer n,
complex, dimension( * ) x,
integer incx,
complex, dimension( * ) y,
integer incy,
real ssmin )

CLAPLL measures the linear dependence of two vectors.

Download CLAPLL + 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 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 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 REAL
!>          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 clapll.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 REAL SSMIN
106* ..
107* .. Array Arguments ..
108 COMPLEX X( * ), Y( * )
109* ..
110*
111* =====================================================================
112*
113* .. Parameters ..
114 REAL ZERO
115 parameter( zero = 0.0e+0 )
116 COMPLEX CONE
117 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
118* ..
119* .. Local Scalars ..
120 REAL SSMAX
121 COMPLEX A11, A12, A22, C, TAU
122* ..
123* .. Intrinsic Functions ..
124 INTRINSIC abs, conjg
125* ..
126* .. External Functions ..
127 COMPLEX CDOTC
128 EXTERNAL cdotc
129* ..
130* .. External Subroutines ..
131 EXTERNAL caxpy, clarfg, slas2
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 clarfg( n, x( 1 ), x( 1+incx ), incx, tau )
145 a11 = x( 1 )
146 x( 1 ) = cone
147*
148 c = -conjg( tau )*cdotc( n, x, incx, y, incy )
149 CALL caxpy( n, c, x, incx, y, incy )
150*
151 CALL clarfg( 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 slas2( abs( a11 ), abs( a12 ), abs( a22 ), ssmin, ssmax )
159*
160 RETURN
161*
162* End of CLAPLL
163*
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
Definition caxpy.f:88
complex function cdotc(n, cx, incx, cy, incy)
CDOTC
Definition cdotc.f:83
subroutine clarfg(n, alpha, x, incx, tau)
CLARFG generates an elementary reflector (Householder matrix).
Definition clarfg.f:104
subroutine slas2(f, g, h, ssmin, ssmax)
SLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition slas2.f:103
Here is the call graph for this function:
Here is the caller graph for this function: