You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

zla_gerpvgrw.f 4.1 kB

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