LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
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.
Date
September 2012

Definition at line 102 of file clapll.f.

102 *
103 * -- LAPACK auxiliary routine (version 3.4.2) --
104 * -- LAPACK is a software package provided by Univ. of Tennessee, --
105 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
106 * September 2012
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 *
subroutine slas2(F, G, H, SSMIN, SSMAX)
SLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition: slas2.f:109
complex function cdotc(N, CX, INCX, CY, INCY)
CDOTC
Definition: cdotc.f:54
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
Definition: caxpy.f:53
subroutine clarfg(N, ALPHA, X, INCX, TAU)
CLARFG generates an elementary reflector (Householder matrix).
Definition: clarfg.f:108

Here is the call graph for this function:

Here is the caller graph for this function: