Skip to main content
#include <rocky_statistics_data.hpp> IRockyStatisticsAccumulator is an auxiliary struct that can be used to sum a set of values generated during a period of time in a simulation. That sum may be an approximation of the value of an integral, needed for calculating integral-based statistics. Such integral can represent a physical magnitude, for instance, an impulse or a work. Please refer to the DEM Technical Manual for a complete description of integral-based statistics.

Members

Public functions

Function add_value

This method adds a new value to the current sum.: Parameters:
  • value: The value that must be added.
Parameters:
  • double value
Return type: ROCKY_FUNCTIONS void

Function get_sum

Returns: The value of the sum accumulated so far. Return type: double

Function reset

This method resets to zero the sum in order to start a new accumulation round.: Return type: void

Function join

This method sums the values accumulated by two instances of: IRockyStatisticsAccumulator associated to two separate sets of values. After calling this method, the value returned by get_sum will be the resulting sum. Parameters: Parameters: Return type: void