LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
dlapll.f
Go to the documentation of this file.
1*> \brief \b DLAPLL measures the linear dependence of two vectors.
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download DLAPLL + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapll.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapll.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapll.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN )
20*
21* .. Scalar Arguments ..
22* INTEGER INCX, INCY, N
23* DOUBLE PRECISION SSMIN
24* ..
25* .. Array Arguments ..
26* DOUBLE PRECISION X( * ), Y( * )
27* ..
28*
29*
30*> \par Purpose:
31* =============
32*>
33*> \verbatim
34*>
35*> Given two column vectors X and Y, let
36*>
37*> A = ( X Y ).
38*>
39*> The subroutine first computes the QR factorization of A = Q*R,
40*> and then computes the SVD of the 2-by-2 upper triangular matrix R.
41*> The smaller singular value of R is returned in SSMIN, which is used
42*> as the measurement of the linear dependency of the vectors X and Y.
43*> \endverbatim
44*
45* Arguments:
46* ==========
47*
48*> \param[in] N
49*> \verbatim
50*> N is INTEGER
51*> The length of the vectors X and Y.
52*> \endverbatim
53*>
54*> \param[in,out] X
55*> \verbatim
56*> X is DOUBLE PRECISION array,
57*> dimension (1+(N-1)*INCX)
58*> On entry, X contains the N-vector X.
59*> On exit, X is overwritten.
60*> \endverbatim
61*>
62*> \param[in] INCX
63*> \verbatim
64*> INCX is INTEGER
65*> The increment between successive elements of X. INCX > 0.
66*> \endverbatim
67*>
68*> \param[in,out] Y
69*> \verbatim
70*> Y is DOUBLE PRECISION array,
71*> dimension (1+(N-1)*INCY)
72*> On entry, Y contains the N-vector Y.
73*> On exit, Y is overwritten.
74*> \endverbatim
75*>
76*> \param[in] INCY
77*> \verbatim
78*> INCY is INTEGER
79*> The increment between successive elements of Y. INCY > 0.
80*> \endverbatim
81*>
82*> \param[out] SSMIN
83*> \verbatim
84*> SSMIN is DOUBLE PRECISION
85*> The smallest singular value of the N-by-2 matrix A = ( X Y ).
86*> \endverbatim
87*
88* Authors:
89* ========
90*
91*> \author Univ. of Tennessee
92*> \author Univ. of California Berkeley
93*> \author Univ. of Colorado Denver
94*> \author NAG Ltd.
95*
96*> \ingroup lapll
97*
98* =====================================================================
99 SUBROUTINE dlapll( N, X, INCX, Y, INCY, SSMIN )
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 DOUBLE PRECISION SSMIN
108* ..
109* .. Array Arguments ..
110 DOUBLE PRECISION X( * ), Y( * )
111* ..
112*
113* =====================================================================
114*
115* .. Parameters ..
116 DOUBLE PRECISION ZERO, ONE
117 parameter( zero = 0.0d+0, one = 1.0d+0 )
118* ..
119* .. Local Scalars ..
120 DOUBLE PRECISION A11, A12, A22, C, SSMAX, TAU
121* ..
122* .. External Functions ..
123 DOUBLE PRECISION DDOT
124 EXTERNAL ddot
125* ..
126* .. External Subroutines ..
127 EXTERNAL daxpy, dlarfg, dlas2
128* ..
129* .. Executable Statements ..
130*
131* Quick return if possible
132*
133 IF( n.LE.1 ) THEN
134 ssmin = zero
135 RETURN
136 END IF
137*
138* Compute the QR factorization of the N-by-2 matrix ( X Y )
139*
140 CALL dlarfg( n, x( 1 ), x( 1+incx ), incx, tau )
141 a11 = x( 1 )
142 x( 1 ) = one
143*
144 c = -tau*ddot( n, x, incx, y, incy )
145 CALL daxpy( n, c, x, incx, y, incy )
146*
147 CALL dlarfg( n-1, y( 1+incy ), y( 1+2*incy ), incy, tau )
148*
149 a12 = y( 1 )
150 a22 = y( 1+incy )
151*
152* Compute the SVD of 2-by-2 Upper triangular matrix.
153*
154 CALL dlas2( a11, a12, a22, ssmin, ssmax )
155*
156 RETURN
157*
158* End of DLAPLL
159*
160 END
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
Definition daxpy.f:89
subroutine dlapll(n, x, incx, y, incy, ssmin)
DLAPLL measures the linear dependence of two vectors.
Definition dlapll.f:100
subroutine dlarfg(n, alpha, x, incx, tau)
DLARFG generates an elementary reflector (Householder matrix).
Definition dlarfg.f:104
subroutine dlas2(f, g, h, ssmin, ssmax)
DLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition dlas2.f:103