LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
dla_gerpvgrw.f
Go to the documentation of this file.
00001 *> \brief \b DLA_GERPVGRW
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download DLA_GERPVGRW + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dla_gerpvgrw.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dla_gerpvgrw.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dla_gerpvgrw.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       DOUBLE PRECISION FUNCTION DLA_GERPVGRW( N, NCOLS, A, LDA, AF,
00022 *                LDAF )
00023 * 
00024 *       .. Scalar Arguments ..
00025 *       INTEGER            N, NCOLS, LDA, LDAF
00026 *       ..
00027 *       .. Array Arguments ..
00028 *       DOUBLE PRECISION   A( LDA, * ), AF( LDAF, * )
00029 *       ..
00030 *  
00031 *
00032 *> \par Purpose:
00033 *  =============
00034 *>
00035 *> \verbatim
00036 *>
00037 *> 
00038 *> DLA_GERPVGRW computes the reciprocal pivot growth factor
00039 *> norm(A)/norm(U). The "max absolute element" norm is used. If this is
00040 *> much less than 1, the stability of the LU factorization of the
00041 *> (equilibrated) matrix A could be poor. This also means that the
00042 *> solution X, estimated condition numbers, and error bounds could be
00043 *> unreliable.
00044 *> \endverbatim
00045 *
00046 *  Arguments:
00047 *  ==========
00048 *
00049 *> \param[in] N
00050 *> \verbatim
00051 *>          N is INTEGER
00052 *>     The number of linear equations, i.e., the order of the
00053 *>     matrix A.  N >= 0.
00054 *> \endverbatim
00055 *>
00056 *> \param[in] NCOLS
00057 *> \verbatim
00058 *>          NCOLS is INTEGER
00059 *>     The number of columns of the matrix A. NCOLS >= 0.
00060 *> \endverbatim
00061 *>
00062 *> \param[in] A
00063 *> \verbatim
00064 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
00065 *>     On entry, the N-by-N matrix A.
00066 *> \endverbatim
00067 *>
00068 *> \param[in] LDA
00069 *> \verbatim
00070 *>          LDA is INTEGER
00071 *>     The leading dimension of the array A.  LDA >= max(1,N).
00072 *> \endverbatim
00073 *>
00074 *> \param[in] AF
00075 *> \verbatim
00076 *>          AF is DOUBLE PRECISION array, dimension (LDAF,N)
00077 *>     The factors L and U from the factorization
00078 *>     A = P*L*U as computed by DGETRF.
00079 *> \endverbatim
00080 *>
00081 *> \param[in] LDAF
00082 *> \verbatim
00083 *>          LDAF is INTEGER
00084 *>     The leading dimension of the array AF.  LDAF >= max(1,N).
00085 *> \endverbatim
00086 *
00087 *  Authors:
00088 *  ========
00089 *
00090 *> \author Univ. of Tennessee 
00091 *> \author Univ. of California Berkeley 
00092 *> \author Univ. of Colorado Denver 
00093 *> \author NAG Ltd. 
00094 *
00095 *> \date November 2011
00096 *
00097 *> \ingroup doubleGEcomputational
00098 *
00099 *  =====================================================================
00100       DOUBLE PRECISION FUNCTION DLA_GERPVGRW( N, NCOLS, A, LDA, AF,
00101      $         LDAF )
00102 *
00103 *  -- LAPACK computational routine (version 3.4.0) --
00104 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00105 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00106 *     November 2011
00107 *
00108 *     .. Scalar Arguments ..
00109       INTEGER            N, NCOLS, LDA, LDAF
00110 *     ..
00111 *     .. Array Arguments ..
00112       DOUBLE PRECISION   A( LDA, * ), AF( LDAF, * )
00113 *     ..
00114 *
00115 *  =====================================================================
00116 *
00117 *     .. Local Scalars ..
00118       INTEGER            I, J
00119       DOUBLE PRECISION   AMAX, UMAX, RPVGRW
00120 *     ..
00121 *     .. Intrinsic Functions ..
00122       INTRINSIC          ABS, MAX, MIN
00123 *     ..
00124 *     .. Executable Statements ..
00125 *
00126       RPVGRW = 1.0D+0
00127 
00128       DO J = 1, NCOLS
00129          AMAX = 0.0D+0
00130          UMAX = 0.0D+0
00131          DO I = 1, N
00132             AMAX = MAX( ABS( A( I, J ) ), AMAX )
00133          END DO
00134          DO I = 1, J
00135             UMAX = MAX( ABS( AF( I, J ) ), UMAX )
00136          END DO
00137          IF ( UMAX /= 0.0D+0 ) THEN
00138             RPVGRW = MIN( AMAX / UMAX, RPVGRW )
00139          END IF
00140       END DO
00141       DLA_GERPVGRW = RPVGRW
00142       END
 All Files Functions