LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ dlapll()

subroutine dlapll ( integer  n,
double precision, dimension( * )  x,
integer  incx,
double precision, dimension( * )  y,
integer  incy,
double precision  ssmin 
)

DLAPLL measures the linear dependence of two vectors.

Download DLAPLL + 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 DOUBLE PRECISION 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 DOUBLE PRECISION 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 DOUBLE PRECISION
          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.

Definition at line 101 of file dlapll.f.

102*
103* -- LAPACK auxiliary routine --
104* -- LAPACK is a software package provided by Univ. of Tennessee, --
105* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
106*
107* .. Scalar Arguments ..
108 INTEGER INCX, INCY, N
109 DOUBLE PRECISION SSMIN
110* ..
111* .. Array Arguments ..
112 DOUBLE PRECISION X( * ), Y( * )
113* ..
114*
115* =====================================================================
116*
117* .. Parameters ..
118 DOUBLE PRECISION ZERO, ONE
119 parameter( zero = 0.0d+0, one = 1.0d+0 )
120* ..
121* .. Local Scalars ..
122 DOUBLE PRECISION A11, A12, A22, C, SSMAX, TAU
123* ..
124* .. External Functions ..
125 DOUBLE PRECISION DDOT
126 EXTERNAL ddot
127* ..
128* .. External Subroutines ..
129 EXTERNAL daxpy, dlarfg, dlas2
130* ..
131* .. Executable Statements ..
132*
133* Quick return if possible
134*
135 IF( n.LE.1 ) THEN
136 ssmin = zero
137 RETURN
138 END IF
139*
140* Compute the QR factorization of the N-by-2 matrix ( X Y )
141*
142 CALL dlarfg( n, x( 1 ), x( 1+incx ), incx, tau )
143 a11 = x( 1 )
144 x( 1 ) = one
145*
146 c = -tau*ddot( n, x, incx, y, incy )
147 CALL daxpy( n, c, x, incx, y, incy )
148*
149 CALL dlarfg( n-1, y( 1+incy ), y( 1+2*incy ), incy, tau )
150*
151 a12 = y( 1 )
152 a22 = y( 1+incy )
153*
154* Compute the SVD of 2-by-2 Upper triangular matrix.
155*
156 CALL dlas2( a11, a12, a22, ssmin, ssmax )
157*
158 RETURN
159*
160* End of DLAPLL
161*
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
Definition daxpy.f:89
double precision function ddot(n, dx, incx, dy, incy)
DDOT
Definition ddot.f:82
subroutine dlarfg(n, alpha, x, incx, tau)
DLARFG generates an elementary reflector (Householder matrix).
Definition dlarfg.f:106
subroutine dlas2(f, g, h, ssmin, ssmax)
DLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition dlas2.f:105
Here is the call graph for this function:
Here is the caller graph for this function: