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