StatsAccumulatorBase.jl
MiniObserve.StatsAccumulatorBase
— ModuleAccumulators can be used to calculate aggregate statistics over sets of elements. In order to be able to work with @observe.@stat
an accumulator has to implement the following functions:
add!(acc, dat)
- add a datum to the accumulator. This function has no default implementation.result_type(T)
- the type of the result the accumulator generates. Per default it is assumed that this is identical to the accumulator type itself.result(acc)
- obtain the current result from the accumulator. Returns the accumulator object itself by default.
MiniObserve.StatsAccumulatorBase.add!
— Functionadd!(accumulator, value)
Add a new value to a given accumulator. This function needs to be implemented for new accumulator types.
MiniObserve.StatsAccumulatorBase.result_type
— Methodresult_type(_)
Returns the type of the results of accumulator T
.
Per default the accumulator type itself is assumed to form the result. Overload for custom result types.
MiniObserve.StatsAccumulatorBase.results
— Methodresults(t)
Return the results of an accumulator.
Per default it is assumed that the accumulator type contains the result. Overload for custom result types.
Index
MiniObserve.Observation
MiniObserve.StatsAccumulatorBase
MiniObserve.StatsAccumulator.CountAcc
MiniObserve.StatsAccumulator.HistAcc
MiniObserve.StatsAccumulator.HistAcc
MiniObserve.StatsAccumulator.MaxMinAcc
MiniObserve.StatsAccumulator.MeanVarAcc
MiniObserve.StatsAccumulator.SumAcc
MiniObserve.Observation.add_to_dataframe!
MiniObserve.Observation.create_dataframe!
MiniObserve.Observation.joined_named_tuple_T
MiniObserve.Observation.log_results
MiniObserve.Observation.print_header
MiniObserve.Observation.stat_names
MiniObserve.Observation.to_named_tuple
MiniObserve.Observation.tuple_type
MiniObserve.StatsAccumulatorBase.add!
MiniObserve.StatsAccumulatorBase.result_type
MiniObserve.StatsAccumulatorBase.results
MiniObserve.Observation.@observe