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