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