The AHA Model
Revision: 12809
Reference implementation 04 (HEDG02_04)
|
Arbitrary rescales value(s) from one range (A:B) to another (A1:B1). More...
Public Member Functions | |
elemental real(srp) function | rescale_1 (value_in, A1, B1) |
Rescale a real variable with the range 0:1 to have the new range A1:B1. More... | |
elemental real(srp) function | rescale_full (value_in, A, B, A1, B1) |
Rescale a real variable with the range A:B to have the new range A1:B1. More... | |
Arbitrary rescales value(s) from one range (A:B) to another (A1:B1).
Rescales values from A:B to A1:B1, or (if only A1:B1 are provided) from 0:1 to A1:B1.
Definition at line 5341 of file m_common.f90.
elemental real(srp) function commondata::rescale::rescale_1 | ( | real(srp), intent(in) | value_in, |
real(srp), intent(in) | A1, | ||
real(srp), intent(in) | B1 | ||
) |
Rescale a real variable with the range 0:1 to have the new range A1:B1.
value_in
lies within [0:1]. Definition at line 5734 of file m_common.f90.
elemental real(srp) function commondata::rescale::rescale_full | ( | real(srp), intent(in) | value_in, |
real(srp), intent(in) | A, | ||
real(srp), intent(in) | B, | ||
real(srp), intent(in) | A1, | ||
real(srp), intent(in) | B1 | ||
) |
Rescale a real variable with the range A:B to have the new range A1:B1.
Linear transformation of the input value value_in
such k * value_in + beta
, where the k
and beta
coefficients are found by solving a simple linear system: . It has this solution:
value_in
lies within [A:B]. Definition at line 5706 of file m_common.f90.