Mean
- class cubie.outputhandling.summarymetrics.mean.Mean(precision)[source]
Bases:
SummaryMetricSummary metric that calculates the arithmetic mean of a variable.
Notes
The metric uses a single buffer slot per variable to accumulate the sum of values and divides by the number of integration steps when the results are saved.
- build() MetricFuncCache[source]
Generate CUDA device functions for mean value calculation.
- Returns:
Cache containing the device update and save callbacks.
- Return type:
MetricFuncCache
Notes
The update callback accumulates the running sum while the save callback divides by
summarise_everyand resets the buffer.