LAPACK  3.10.0
LAPACK: Linear Algebra PACKage
cla_gerpvgrw.f
Go to the documentation of this file.
1 *> \brief \b CLA_GERPVGRW multiplies a square real matrix by a complex matrix.
2 *
3 * =========== DOCUMENTATION ===========
4 *
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
7 *
8 *> \htmlonly
9 *> Download CLA_GERPVGRW + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cla_gerpvgrw.f">
11 *> [TGZ]</a>
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cla_gerpvgrw.f">
13 *> [ZIP]</a>
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cla_gerpvgrw.f">
15 *> [TXT]</a>
16 *> \endhtmlonly
17 *
18 * Definition:
19 * ===========
20 *
21 * REAL FUNCTION CLA_GERPVGRW( N, NCOLS, A, LDA, AF, LDAF )
22 *
23 * .. Scalar Arguments ..
24 * INTEGER N, NCOLS, LDA, LDAF
25 * ..
26 * .. Array Arguments ..
27 * COMPLEX A( LDA, * ), AF( LDAF, * )
28 * ..
29 *
30 *
31 *> \par Purpose:
32 * =============
33 *>
34 *> \verbatim
35 *>
36 *>
37 *> CLA_GERPVGRW computes the reciprocal pivot growth factor
38 *> norm(A)/norm(U). The "max absolute element" norm is used. If this is
39 *> much less than 1, the stability of the LU factorization of the
40 *> (equilibrated) matrix A could be poor. This also means that the
41 *> solution X, estimated condition numbers, and error bounds could be
42 *> unreliable.
43 *> \endverbatim
44 *
45 * Arguments:
46 * ==========
47 *
48 *> \param[in] N
49 *> \verbatim
50 *> N is INTEGER
51 *> The number of linear equations, i.e., the order of the
52 *> matrix A. N >= 0.
53 *> \endverbatim
54 *>
55 *> \param[in] NCOLS
56 *> \verbatim
57 *> NCOLS is INTEGER
58 *> The number of columns of the matrix A. NCOLS >= 0.
59 *> \endverbatim
60 *>
61 *> \param[in] A
62 *> \verbatim
63 *> A is COMPLEX array, dimension (LDA,N)
64 *> On entry, the N-by-N matrix A.
65 *> \endverbatim
66 *>
67 *> \param[in] LDA
68 *> \verbatim
69 *> LDA is INTEGER
70 *> The leading dimension of the array A. LDA >= max(1,N).
71 *> \endverbatim
72 *>
73 *> \param[in] AF
74 *> \verbatim
75 *> AF is COMPLEX array, dimension (LDAF,N)
76 *> The factors L and U from the factorization
77 *> A = P*L*U as computed by CGETRF.
78 *> \endverbatim
79 *>
80 *> \param[in] LDAF
81 *> \verbatim
82 *> LDAF is INTEGER
83 *> The leading dimension of the array AF. LDAF >= max(1,N).
84 *> \endverbatim
85 *
86 * Authors:
87 * ========
88 *
89 *> \author Univ. of Tennessee
90 *> \author Univ. of California Berkeley
91 *> \author Univ. of Colorado Denver
92 *> \author NAG Ltd.
93 *
94 *> \ingroup complexGEcomputational
95 *
96 * =====================================================================
97  REAL function cla_gerpvgrw( n, ncols, a, lda, af, ldaf )
98 *
99 * -- LAPACK computational routine --
100 * -- LAPACK is a software package provided by Univ. of Tennessee, --
101 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
102 *
103 * .. Scalar Arguments ..
104  INTEGER n, ncols, lda, ldaf
105 * ..
106 * .. Array Arguments ..
107  COMPLEX a( lda, * ), af( ldaf, * )
108 * ..
109 *
110 * =====================================================================
111 *
112 * .. Local Scalars ..
113  INTEGER i, j
114  REAL amax, umax, rpvgrw
115  COMPLEX zdum
116 * ..
117 * .. Intrinsic Functions ..
118  INTRINSIC max, min, abs, real, aimag
119 * ..
120 * .. Statement Functions ..
121  REAL cabs1
122 * ..
123 * .. Statement Function Definitions ..
124  cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
125 * ..
126 * .. Executable Statements ..
127 *
128  rpvgrw = 1.0
129 
130  DO j = 1, ncols
131  amax = 0.0
132  umax = 0.0
133  DO i = 1, n
134  amax = max( cabs1( a( i, j ) ), amax )
135  END DO
136  DO i = 1, j
137  umax = max( cabs1( af( i, j ) ), umax )
138  END DO
139  IF ( umax /= 0.0 ) THEN
140  rpvgrw = min( amax / umax, rpvgrw )
141  END IF
142  END DO
143  cla_gerpvgrw = rpvgrw
144 *
145 * End of CLA_GERPVGRW
146 *
147  END
real function cla_gerpvgrw(N, NCOLS, A, LDA, AF, LDAF)
CLA_GERPVGRW multiplies a square real matrix by a complex matrix.
Definition: cla_gerpvgrw.f:98