The aggregator_t type is an abstract base type for performing time
aggregations on source data arrays. Support for different data types and
array ranks is provided through extensions of this type.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | counter | = | 0 |
The number of times the source data has been accumulated. |
|
| procedure(accumulate_data), | public, | pointer | :: | accumulate |
A procedure pointer to the accumulation method used to compute the time
aggregated quantity. The specific method (e.g., mean, sum, min, max) is
set by the |
||
| procedure(reset_data), | public, | pointer | :: | reset |
A procedure pointer to the reset method used to reset the aggregated data. The
specific method (e.g., mean, sum, min, max) is set by the |
Initialise the aggregator.
Initialise the aggregator by allocating the aggregated data array and its aggregation method. The values in the aggregated data array are reset according to the specified aggregation method.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | method |
The aggregation method to use (e.g., "mean", "sum", "point", "min", "max"). |
Return a string identifier of the aggregator type.
Return a string identifier of the aggregator type (e.g., "int32", "real32", "real64").
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(in) | :: | this |
Return the rank of the aggregator.
Return the rank of the aggregator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(in) | :: | this |
Return the shape of the aggregator.
Return the shape of the aggregator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(in) | :: | this |
Scale the aggregated data by a specified factor.
Scale the aggregated data by a specified factor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(inout) | :: | this | |||
| real, | intent(in) | :: | scale |
The factor by which to scale the aggregated data. |
Divide the aggregated data by a specified factor.
Divide the aggregated data by a specified factor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(inout) | :: | this | |||
| real, | intent(in) | :: | div |
The factor by which to divide the aggregated data. |
Add a specified offset to the aggregated data.
Offset the aggregated data by a specified value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(inout) | :: | this | |||
| real, | intent(in) | :: | offset |
The value by which to offset the aggregated data. |
Set the aggregation method.
Set the aggregation method for the aggregator by assigning the appropriate accumulation and reset procedures based on the specified method.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aggregator_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | method |
The aggregation method to use (e.g., "mean", "sum", "point", "min", "max"). |