Mercurial > hg > fxanalyse
diff stat.h @ 133:7540703b8473
Major code cleanup. Implement beatnote recentering.
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Wed, 22 Jan 2014 12:10:17 +0100 |
parents | |
children | e04123ab79ef |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stat.h Wed Jan 22 12:10:17 2014 +0100 @@ -0,0 +1,27 @@ +#ifndef __STAT_H__ +#define __STAT_H__ + +struct stat { + int samples; + double mean; + double slope; + double previous; +}; + +void stat_zero(struct stat *s); +void stat_accumulate(struct stat *s, double value); + +#define ROLLMEAN_N_OBS 10 + +struct rollmean { + int wlen; + int nobs; + double mean; + double acc; + double prev; +}; + +void rollmean_zero(struct rollmean *s, int wlen); +void rollmean_accumulate(struct rollmean *s, double value); + +#endif