view 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 source

#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