Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprz_stat.h File Reference
#include "std.h"
+ Include dependency graph for pprz_stat.h:

Go to the source code of this file.

Functions

static float variance_float (float *array, int nb)
 Compute the variance of an array of values (float). More...
 
static int32_t variance_int (int32_t *array, int nb)
 Compute the variance of an array of values (integer). More...
 

Function Documentation

static float variance_float ( float *  array,
int  nb 
)
inlinestatic

Compute the variance of an array of values (float).

The variance is a measure of how far a set of numbers is spread out V(X) = E[(X-E[X])^2] = E[X^2] - E[X]^2 where E[X] is the expected value of X

Parameters
arraypointer to an array of float
nbnumbre of values in the array, must be >0
Returns
variance

Definition at line 37 of file pprz_stat.h.

static int32_t variance_int ( int32_t array,
int  nb 
)
inlinestatic

Compute the variance of an array of values (integer).

The variance is a measure of how far a set of numbers is spread out V(X) = E[(X-E[X])^2] = E[X^2] - E[X]^2 where E[X] is the expected value of X

Parameters
arraypointer to an array of integer
nbnumbre of values in the array, must be >0
Returns
variance

Definition at line 57 of file pprz_stat.h.