Annotation of rpl/lapack/lapack/dlapll.f, revision 1.14

1.11      bertrand    1: *> \brief \b DLAPLL measures the linear dependence of two vectors.
1.8       bertrand    2: *
                      3: *  =========== DOCUMENTATION ===========
                      4: *
                      5: * Online html documentation available at 
                      6: *            http://www.netlib.org/lapack/explore-html/ 
                      7: *
                      8: *> \htmlonly
                      9: *> Download DLAPLL + dependencies 
                     10: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapll.f"> 
                     11: *> [TGZ]</a> 
                     12: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapll.f"> 
                     13: *> [ZIP]</a> 
                     14: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapll.f"> 
                     15: *> [TXT]</a>
                     16: *> \endhtmlonly 
                     17: *
                     18: *  Definition:
                     19: *  ===========
                     20: *
                     21: *       SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN )
                     22: * 
                     23: *       .. Scalar Arguments ..
                     24: *       INTEGER            INCX, INCY, N
                     25: *       DOUBLE PRECISION   SSMIN
                     26: *       ..
                     27: *       .. Array Arguments ..
                     28: *       DOUBLE PRECISION   X( * ), Y( * )
                     29: *       ..
                     30: *  
                     31: *
                     32: *> \par Purpose:
                     33: *  =============
                     34: *>
                     35: *> \verbatim
                     36: *>
                     37: *> Given two column vectors X and Y, let
                     38: *>
                     39: *>                      A = ( X Y ).
                     40: *>
                     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.
                     45: *> \endverbatim
                     46: *
                     47: *  Arguments:
                     48: *  ==========
                     49: *
                     50: *> \param[in] N
                     51: *> \verbatim
                     52: *>          N is INTEGER
                     53: *>          The length of the vectors X and Y.
                     54: *> \endverbatim
                     55: *>
                     56: *> \param[in,out] X
                     57: *> \verbatim
                     58: *>          X is DOUBLE PRECISION array,
                     59: *>                         dimension (1+(N-1)*INCX)
                     60: *>          On entry, X contains the N-vector X.
                     61: *>          On exit, X is overwritten.
                     62: *> \endverbatim
                     63: *>
                     64: *> \param[in] INCX
                     65: *> \verbatim
                     66: *>          INCX is INTEGER
                     67: *>          The increment between successive elements of X. INCX > 0.
                     68: *> \endverbatim
                     69: *>
                     70: *> \param[in,out] Y
                     71: *> \verbatim
                     72: *>          Y is DOUBLE PRECISION array,
                     73: *>                         dimension (1+(N-1)*INCY)
                     74: *>          On entry, Y contains the N-vector Y.
                     75: *>          On exit, Y is overwritten.
                     76: *> \endverbatim
                     77: *>
                     78: *> \param[in] INCY
                     79: *> \verbatim
                     80: *>          INCY is INTEGER
                     81: *>          The increment between successive elements of Y. INCY > 0.
                     82: *> \endverbatim
                     83: *>
                     84: *> \param[out] SSMIN
                     85: *> \verbatim
                     86: *>          SSMIN is DOUBLE PRECISION
                     87: *>          The smallest singular value of the N-by-2 matrix A = ( X Y ).
                     88: *> \endverbatim
                     89: *
                     90: *  Authors:
                     91: *  ========
                     92: *
                     93: *> \author Univ. of Tennessee 
                     94: *> \author Univ. of California Berkeley 
                     95: *> \author Univ. of Colorado Denver 
                     96: *> \author NAG Ltd. 
                     97: *
1.11      bertrand   98: *> \date September 2012
1.8       bertrand   99: *
                    100: *> \ingroup doubleOTHERauxiliary
                    101: *
                    102: *  =====================================================================
1.1       bertrand  103:       SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN )
                    104: *
1.11      bertrand  105: *  -- LAPACK auxiliary routine (version 3.4.2) --
1.1       bertrand  106: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
                    107: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
1.11      bertrand  108: *     September 2012
1.1       bertrand  109: *
                    110: *     .. Scalar Arguments ..
                    111:       INTEGER            INCX, INCY, N
                    112:       DOUBLE PRECISION   SSMIN
                    113: *     ..
                    114: *     .. Array Arguments ..
                    115:       DOUBLE PRECISION   X( * ), Y( * )
                    116: *     ..
                    117: *
                    118: *  =====================================================================
                    119: *
                    120: *     .. Parameters ..
                    121:       DOUBLE PRECISION   ZERO, ONE
                    122:       PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
                    123: *     ..
                    124: *     .. Local Scalars ..
                    125:       DOUBLE PRECISION   A11, A12, A22, C, SSMAX, TAU
                    126: *     ..
                    127: *     .. External Functions ..
                    128:       DOUBLE PRECISION   DDOT
                    129:       EXTERNAL           DDOT
                    130: *     ..
                    131: *     .. External Subroutines ..
                    132:       EXTERNAL           DAXPY, DLARFG, DLAS2
                    133: *     ..
                    134: *     .. Executable Statements ..
                    135: *
                    136: *     Quick return if possible
                    137: *
                    138:       IF( N.LE.1 ) THEN
                    139:          SSMIN = ZERO
                    140:          RETURN
                    141:       END IF
                    142: *
                    143: *     Compute the QR factorization of the N-by-2 matrix ( X Y )
                    144: *
                    145:       CALL DLARFG( N, X( 1 ), X( 1+INCX ), INCX, TAU )
                    146:       A11 = X( 1 )
                    147:       X( 1 ) = ONE
                    148: *
                    149:       C = -TAU*DDOT( N, X, INCX, Y, INCY )
                    150:       CALL DAXPY( N, C, X, INCX, Y, INCY )
                    151: *
                    152:       CALL DLARFG( N-1, Y( 1+INCY ), Y( 1+2*INCY ), INCY, TAU )
                    153: *
                    154:       A12 = Y( 1 )
                    155:       A22 = Y( 1+INCY )
                    156: *
                    157: *     Compute the SVD of 2-by-2 Upper triangular matrix.
                    158: *
                    159:       CALL DLAS2( A11, A12, A22, SSMIN, SSMAX )
                    160: *
                    161:       RETURN
                    162: *
                    163: *     End of DLAPLL
                    164: *
                    165:       END

CVSweb interface <joel.bertrand@systella.fr>