luasandbox  1.4.0
Generic Lua sandbox for dynamic data analysis
Classes | Typedefs | Functions
running_stats.h File Reference

Calculates the running count, sum, mean, variance, and standard deviation. More...

#include "util.h"
Include dependency graph for running_stats.h:

Go to the source code of this file.

Classes

struct  lsb_running_stats
 

Typedefs

typedef struct lsb_running_stats lsb_running_stats
 

Functions

LSB_UTIL_EXPORT void lsb_init_running_stats (lsb_running_stats *s)
 Zeros out the stats counters. More...
 
LSB_UTIL_EXPORT void lsb_update_running_stats (lsb_running_stats *s, double d)
 Value to add to the running stats. More...
 
LSB_UTIL_EXPORT double lsb_sd_running_stats (lsb_running_stats *s)
 Return the standard deviation of the stats. More...
 

Detailed Description

Calculates the running count, sum, mean, variance, and standard deviation.

Definition in file running_stats.h.

Typedef Documentation

Function Documentation

LSB_UTIL_EXPORT void lsb_init_running_stats ( lsb_running_stats s)

Zeros out the stats counters.

Parameters
sStat structure to zero out
LSB_UTIL_EXPORT double lsb_sd_running_stats ( lsb_running_stats s)

Return the standard deviation of the stats.

Parameters
sStat structure
Returns
double Standard deviation of the stats up to this point
LSB_UTIL_EXPORT void lsb_update_running_stats ( lsb_running_stats s,
double  d 
)

Value to add to the running stats.

Parameters
sStat structure
dValue to add