LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine slapll ( integer  N,
real, dimension( * )  X,
integer  INCX,
real, dimension( * )  Y,
integer  INCY,
real  SSMIN 
)

SLAPLL measures the linear dependence of two vectors.

Download SLAPLL + 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 REAL 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 REAL 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 104 of file slapll.f.

104 *
105 * -- LAPACK auxiliary routine (version 3.4.2) --
106 * -- LAPACK is a software package provided by Univ. of Tennessee, --
107 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
108 * September 2012
109 *
110 * .. Scalar Arguments ..
111  INTEGER incx, incy, n
112  REAL ssmin
113 * ..
114 * .. Array Arguments ..
115  REAL x( * ), y( * )
116 * ..
117 *
118 * =====================================================================
119 *
120 * .. Parameters ..
121  REAL zero, one
122  parameter ( zero = 0.0e+0, one = 1.0e+0 )
123 * ..
124 * .. Local Scalars ..
125  REAL a11, a12, a22, c, ssmax, tau
126 * ..
127 * .. External Functions ..
128  REAL sdot
129  EXTERNAL sdot
130 * ..
131 * .. External Subroutines ..
132  EXTERNAL saxpy, slarfg, slas2
133 * ..
134 * .. Executable Statements ..
135 *
136 * Quick return if possible
137 *
138  IF( n.LE.1 ) THEN
139  ssmin = zero
140  RETURN
141  END IF
142 *
143 * Compute the QR factorization of the N-by-2 matrix ( X Y )
144 *
145  CALL slarfg( n, x( 1 ), x( 1+incx ), incx, tau )
146  a11 = x( 1 )
147  x( 1 ) = one
148 *
149  c = -tau*sdot( n, x, incx, y, incy )
150  CALL saxpy( n, c, x, incx, y, incy )
151 *
152  CALL slarfg( n-1, y( 1+incy ), y( 1+2*incy ), incy, tau )
153 *
154  a12 = y( 1 )
155  a22 = y( 1+incy )
156 *
157 * Compute the SVD of 2-by-2 Upper triangular matrix.
158 *
159  CALL slas2( a11, a12, a22, ssmin, ssmax )
160 *
161  RETURN
162 *
163 * End of SLAPLL
164 *
subroutine slarfg(N, ALPHA, X, INCX, TAU)
SLARFG generates an elementary reflector (Householder matrix).
Definition: slarfg.f:108
real function sdot(N, SX, INCX, SY, INCY)
SDOT
Definition: sdot.f:53
subroutine slas2(F, G, H, SSMIN, SSMAX)
SLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition: slas2.f:109
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
Definition: saxpy.f:54

Here is the call graph for this function:

Here is the caller graph for this function: