LAPACK  3.6.1 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
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 *> \date September 2012
95 *
96 *> \ingroup complexGEcomputational
97 *
98 * =====================================================================
99  REAL FUNCTION cla_gerpvgrw( N, NCOLS, A, LDA, AF, LDAF )
100 *
101 * -- LAPACK computational routine (version 3.4.2) --
102 * -- LAPACK is a software package provided by Univ. of Tennessee, --
103 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
104 * September 2012
105 *
106 * .. Scalar Arguments ..
107  INTEGER N, NCOLS, LDA, LDAF
108 * ..
109 * .. Array Arguments ..
110  COMPLEX A( lda, * ), AF( ldaf, * )
111 * ..
112 *
113 * =====================================================================
114 *
115 * .. Local Scalars ..
116  INTEGER I, J
117  REAL AMAX, UMAX, RPVGRW
118  COMPLEX ZDUM
119 * ..
120 * .. Intrinsic Functions ..
121  INTRINSIC max, min, abs, REAL, AIMAG
122 * ..
123 * .. Statement Functions ..
124  REAL CABS1
125 * ..
126 * .. Statement Function Definitions ..
127  cabs1( zdum ) = abs( REAL( ZDUM ) ) + abs( AIMAG( zdum ) )
128 * ..
129 * .. Executable Statements ..
130 *
131  rpvgrw = 1.0
132
133  DO j = 1, ncols
134  amax = 0.0
135  umax = 0.0
136  DO i = 1, n
137  amax = max( cabs1( a( i, j ) ), amax )
138  END DO
139  DO i = 1, j
140  umax = max( cabs1( af( i, j ) ), umax )
141  END DO
142  IF ( umax /= 0.0 ) THEN
143  rpvgrw = min( amax / umax, rpvgrw )
144  END IF
145  END DO
146  cla_gerpvgrw = rpvgrw
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:100