|
subroutine | corral (m, n, mask, a, d, aa, e) |
| Find positive diagonals D and E and a Lagrange multiplier F that minimize the row-sum +column-sum of masked terms, (D_i +log(|A_ij|) +E_j)^2 subject to the single constraint, sum_j E_j =0, where the mask permits only nonnegligible A_ij to participate in the quadratic quantities. More...
|
|
Definition at line 91 of file pmat4.f90.
◆ corral()
subroutine pmat4::corral::corral |
( |
integer(spi), intent(in) |
m, |
|
|
integer(spi), intent(in) |
n, |
|
|
logical, dimension(m,n), intent(in) |
mask, |
|
|
real(dp), dimension(m,n), intent(in) |
a, |
|
|
real(dp), dimension(m ), intent(out) |
d, |
|
|
real(dp), dimension(m,n), intent(out) |
aa, |
|
|
real(dp), dimension( n), intent(out) |
e |
|
) |
| |
|
private |
Find positive diagonals D and E and a Lagrange multiplier F that minimize the row-sum +column-sum of masked terms, (D_i +log(|A_ij|) +E_j)^2 subject to the single constraint, sum_j E_j =0, where the mask permits only nonnegligible A_ij to participate in the quadratic quantities.
Once a solution for D and E is found, return their exponentials, d and e, together with the rescaled matrix aa such that a = d.aa.e when d and e are interpreted as diagonal matrices.
- Parameters
-
[in] | m | number of rows of A |
[in] | n | number of columns of A |
[in] | mask | logical mask |
[in] | a | real rectangular matrix A |
[out] | d | positive diagonal matrix of dimension m |
[in] | aa | rescaled version of A |
[out] | e | positive diagonal matrix of dimension n |
- Author
- R. J. Purser
Definition at line 1441 of file pmat4.f90.
The documentation for this interface was generated from the following file:
- /lfs/h2/emc/stmp/george.gayno/UFS_UTILS.tag/sorc/grid_tools.fd/regional_esg_grid.fd/pmat4.f90