This module implements a time step controller and an object to manage statistical measures
Todo
Document the rest of the module
Measure controller for managing time steps
The idea is that this controller will keep track of the last value added and the last position added
The procedures will automatically add or not a given position
get_pos_array
will return the array of positions in which the value can be added
get_max_array_size
will return the maximum size of the array of positions that can be added
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=dp), | public | :: | last_value_added | = | 0.0_dp |
Last value added |
|
integer(kind=i4), | public | :: | last_position_added | = | 0 |
Last position added |
|
real(kind=dp), | public | :: | position_step | = | 1.0_dp |
Position step size |
|
real(kind=dp), | public | :: | min_value | = | 0.0_dp |
Minimum value for the measure |
|
procedure(measure_controller_get_pos_array_i), | public, | pointer | :: | get_pos_array | => | null() |
Get position array |
procedure(measure_controller_get_max_array_size_i), | public, | pointer | :: | get_max_array_size | => | null() |
Get maximum array size |
procedure(measure_controller_update), | public, | pointer | :: | update | => | null() |
Update measure |
procedure, public :: init => measure_controller_init | Initialize measure controller |
procedure, public :: reset => measure_controller_reset | Reset measure controller |
Object to handle statistical measures This object will keep track of the statistical measures for a given set of points Procedures are available to access the measures
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=i4), | public, | allocatable | :: | n_samples(:) |
number of samples for each point |
||
real(kind=dp), | public, | allocatable | :: | sum_values(:) |
used to store the values of the measure |
||
real(kind=dp), | public, | allocatable | :: | sum_values_squares(:) |
used to store the squares of the values of the measure |
||
real(kind=dp), | public, | allocatable | :: | sum_values_thirds(:) |
used to store the cubes of the values of the measure |
||
integer(kind=i4), | public | :: | n_size |
Number of points in the measure |
|||
integer(kind=i4), | public | :: | max_n_samples | = | 0 |
Maximum number of samples for any point |
procedure, public :: init => statistical_measure_init | |
procedure, public :: add_point => statistical_measure_add_point | |
generic, public :: get_mean => statistical_measure_get_mean_pos, statistical_measure_get_mean_array | |
generic, public :: get_variance => statistical_measure_get_variance_pos, statistical_measure_get_variance_array | |
generic, public :: get_stddev => statistical_measure_get_stddev_pos, statistical_measure_get_stddev_array | |
generic, public :: get_skewness => statistical_measure_get_skewness_pos, statistical_measure_get_skewness_array |