LAPACK 3.12.1
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 99 of file dlapll.f.

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*
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:104
subroutine dlas2(f, g, h, ssmin, ssmax)
DLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition dlas2.f:103
Here is the call graph for this function:
Here is the caller graph for this function: