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

◆ slapll()

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.

Definition at line 99 of file slapll.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 REAL SSMIN
108* ..
109* .. Array Arguments ..
110 REAL X( * ), Y( * )
111* ..
112*
113* =====================================================================
114*
115* .. Parameters ..
116 REAL ZERO, ONE
117 parameter( zero = 0.0e+0, one = 1.0e+0 )
118* ..
119* .. Local Scalars ..
120 REAL A11, A12, A22, C, SSMAX, TAU
121* ..
122* .. External Functions ..
123 REAL SDOT
124 EXTERNAL sdot
125* ..
126* .. External Subroutines ..
127 EXTERNAL saxpy, slarfg, slas2
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 slarfg( n, x( 1 ), x( 1+incx ), incx, tau )
141 a11 = x( 1 )
142 x( 1 ) = one
143*
144 c = -tau*sdot( n, x, incx, y, incy )
145 CALL saxpy( n, c, x, incx, y, incy )
146*
147 CALL slarfg( 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 slas2( a11, a12, a22, ssmin, ssmax )
155*
156 RETURN
157*
158* End of SLAPLL
159*
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
Definition saxpy.f:89
real function sdot(n, sx, incx, sy, incy)
SDOT
Definition sdot.f:82
subroutine slarfg(n, alpha, x, incx, tau)
SLARFG generates an elementary reflector (Householder matrix).
Definition slarfg.f:104
subroutine slas2(f, g, h, ssmin, ssmax)
SLAS2 computes singular values of a 2-by-2 triangular matrix.
Definition slas2.f:103
Here is the call graph for this function:
Here is the caller graph for this function: