10 #ifndef sa_running_stats_h_ 11 #define sa_running_stats_h_ void sa_init_running_stats(sa_running_stats *s)
Zeros out the stats counters.
double sa_sd_running_stats(sa_running_stats *s)
Returns the corrected sample standard deviation of the stats.
int sa_deserialize_running_stats(sa_running_stats *s, const char *buf, size_t len)
Restores the internal state from the serialized output.
struct sa_running_stats sa_running_stats
char * sa_serialize_running_stats(sa_running_stats *s, size_t *len)
Serialize the internal state to a buffer.
double sa_variance_running_stats(sa_running_stats *s)
Returns the variance of the stats.
double sa_usd_running_stats(sa_running_stats *s)
Returns the uncorrected sample standard deviation of the stats.
void sa_add_running_stats(sa_running_stats *s, double d)
Value to add to the running stats.