comparison stat.h @ 139:e04123ab79ef

Fix recenter
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Wed, 22 Jan 2014 14:45:22 +0100
parents 7540703b8473
children
comparison
equal deleted inserted replaced
138:02044ad2749a 139:e04123ab79ef
9 }; 9 };
10 10
11 void stat_zero(struct stat *s); 11 void stat_zero(struct stat *s);
12 void stat_accumulate(struct stat *s, double value); 12 void stat_accumulate(struct stat *s, double value);
13 13
14 #define ROLLMEAN_N_OBS 10 14 /* must be a power of two */
15 #define _ROLLMEAN_WLEN 16
15 16
16 struct rollmean { 17 struct rollmean {
17 int wlen; 18 unsigned int nobs;
18 int nobs;
19 double mean; 19 double mean;
20 double acc; 20 double acc;
21 double prev; 21 double prev[_ROLLMEAN_WLEN];
22 }; 22 };
23 23
24 void rollmean_zero(struct rollmean *s, int wlen); 24 void rollmean_zero(struct rollmean *s);
25 void rollmean_accumulate(struct rollmean *s, double value); 25 void rollmean_accumulate(struct rollmean *s, double value);
26 26
27 #endif 27 #endif