1 *> \brief \b SLAPLL measures the linear dependence of two vectors.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download SLAPLL + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slapll.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slapll.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slapll.f">
21 * SUBROUTINE SLAPLL( N, X, INCX, Y, INCY, SSMIN )
23 * .. Scalar Arguments ..
24 * INTEGER INCX, INCY, N
27 * .. Array Arguments ..
37 *> Given two column vectors X and Y, let
41 *> The subroutine first computes the QR factorization of A = Q*R,
42 *> and then computes the SVD of the 2-by-2 upper triangular matrix R.
43 *> The smaller singular value of R is returned in SSMIN, which is used
44 *> as the measurement of the linear dependency of the vectors X and Y.
53 *> The length of the vectors X and Y.
59 *> dimension (1+(N-1)*INCX)
60 *> On entry, X contains the N-vector X.
61 *> On exit, X is overwritten.
67 *> The increment between successive elements of X. INCX > 0.
73 *> dimension (1+(N-1)*INCY)
74 *> On entry, Y contains the N-vector Y.
75 *> On exit, Y is overwritten.
81 *> The increment between successive elements of Y. INCY > 0.
87 *> The smallest singular value of the N-by-2 matrix A = ( X Y ).
93 *> \author Univ. of Tennessee
94 *> \author Univ. of California Berkeley
95 *> \author Univ. of Colorado Denver
98 *> \date September 2012
100 *> \ingroup realOTHERauxiliary
102 * =====================================================================
103 SUBROUTINE SLAPLL( N, X, INCX, Y, INCY, SSMIN )
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..--
110 * .. Scalar Arguments ..
111 INTEGER INCX, INCY, N
114 * .. Array Arguments ..
118 * =====================================================================
122 PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
124 * .. Local Scalars ..
125 REAL A11, A12, A22, C, SSMAX, TAU
127 * .. External Functions ..
131 * .. External Subroutines ..
132 EXTERNAL SAXPY, SLARFG, SLAS2
134 * .. Executable Statements ..
136 * Quick return if possible
143 * Compute the QR factorization of the N-by-2 matrix ( X Y )
145 CALL SLARFG( N, X( 1 ), X( 1+INCX ), INCX, TAU )
149 C = -TAU*SDOT( N, X, INCX, Y, INCY )
150 CALL SAXPY( N, C, X, INCX, Y, INCY )
152 CALL SLARFG( N-1, Y( 1+INCY ), Y( 1+2*INCY ), INCY, TAU )
157 * Compute the SVD of 2-by-2 Upper triangular matrix.
159 CALL SLAS2( A11, A12, A22, SSMIN, SSMAX )