| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real32), | private | :: | list_a(0:max_n_iter_real32) |
history of the arithmetic mean |
|||
| real(kind=real32), | private | :: | list_g(0:max_n_iter_real32) |
history of the geometric mean |
Safe wrapper for the arithmetic-geometric mean (AGM) computation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real32_type), | intent(inout) | :: | agm | |||
| real(kind=real32), | intent(in) | :: | x | |||
| real(kind=real32), | intent(in) | :: | y |
Compute arithmetic–geometric mean (AGM)
using the given arithmetic mean init_a and geometric mean init_g
and store the complete iteration history.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real32_type), | intent(inout) | :: | agm | |||
| real(kind=real32), | intent(in) | :: | init_a |
initial value: arithmetic mean |
||
| real(kind=real32), | intent(in) | :: | init_g |
initial value: geometric mean |
Compute arithmetic–geometric mean (AGM)
using the given arithmetic mean init_a and geometric mean init_g
and store the complete iteration history.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real32_type), | intent(inout) | :: | agm | |||
| real(kind=real32), | intent(in) | :: | init_a |
initial value: arithmetic mean |
||
| real(kind=real32), | intent(in) | :: | init_g |
initial value: geometric mean |
Safe wrapper for the arithmetic-geometric mean (AGM) computation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real32_type), | intent(inout) | :: | agm | |||
| real(kind=real32), | intent(in) | :: | x | |||
| real(kind=real32), | intent(in) | :: | y |
return the number of iterations performed during AGM calculation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_base_type), | intent(in) | :: | agm |
type, extends(arithmetic_geometric_mean_base_type) :: arithmetic_geometric_mean_real32_type real(real32), private :: list_a(0:max_n_iter_real32) !! history of the arithmetic mean real(real32), private :: list_g(0:max_n_iter_real32) !! history of the geometric mean contains procedure, pass, private :: compute_real32 procedure, pass, private :: compute_kernel_real32 generic, public :: compute => compute_real32 generic, private :: compute_kernel => compute_kernel_real32 end type arithmetic_geometric_mean_real32_type