 LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
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.

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 ).```

Definition at line 99 of file clapll.f.

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