 LAPACK  3.9.0 LAPACK: Linear Algebra PACKage

## ◆ 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 ).```
Date
December 2016

Definition at line 102 of file clapll.f.

102 *
103 * -- LAPACK auxiliary routine (version 3.7.0) --
104 * -- LAPACK is a software package provided by Univ. of Tennessee, --
105 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
106 * December 2016
107 *
108 * .. Scalar Arguments ..
109  INTEGER INCX, INCY, N
110  REAL SSMIN
111 * ..
112 * .. Array Arguments ..
113  COMPLEX X( * ), Y( * )
114 * ..
115 *
116 * =====================================================================
117 *
118 * .. Parameters ..
119  REAL ZERO
120  parameter( zero = 0.0e+0 )
121  COMPLEX CONE
122  parameter( cone = ( 1.0e+0, 0.0e+0 ) )
123 * ..
124 * .. Local Scalars ..
125  REAL SSMAX
126  COMPLEX A11, A12, A22, C, TAU
127 * ..
128 * .. Intrinsic Functions ..
129  INTRINSIC abs, conjg
130 * ..
131 * .. External Functions ..
132  COMPLEX CDOTC
133  EXTERNAL cdotc
134 * ..
135 * .. External Subroutines ..
136  EXTERNAL caxpy, clarfg, slas2
137 * ..
138 * .. Executable Statements ..
139 *
140 * Quick return if possible
141 *
142  IF( n.LE.1 ) THEN
143  ssmin = zero
144  RETURN
145  END IF
146 *
147 * Compute the QR factorization of the N-by-2 matrix ( X Y )
148 *
149  CALL clarfg( n, x( 1 ), x( 1+incx ), incx, tau )
150  a11 = x( 1 )
151  x( 1 ) = cone
152 *
153  c = -conjg( tau )*cdotc( n, x, incx, y, incy )
154  CALL caxpy( n, c, x, incx, y, incy )
155 *
156  CALL clarfg( n-1, y( 1+incy ), y( 1+2*incy ), incy, tau )
157 *
158  a12 = y( 1 )
159  a22 = y( 1+incy )
160 *
161 * Compute the SVD of 2-by-2 Upper triangular matrix.
162 *
163  CALL slas2( abs( a11 ), abs( a12 ), abs( a22 ), ssmin, ssmax )
164 *
165  RETURN
166 *
167 * End of CLAPLL
168 *
Here is the call graph for this function:
Here is the caller graph for this function:
clarfg
subroutine clarfg(N, ALPHA, X, INCX, TAU)
CLARFG generates an elementary reflector (Householder matrix).
Definition: clarfg.f:108
slas2
subroutine slas2(F, G, H, SSMIN, SSMAX)
SLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition: slas2.f:109
cdotc
complex function cdotc(N, CX, INCX, CY, INCY)
CDOTC
Definition: cdotc.f:85
caxpy
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
Definition: caxpy.f:90