15 fbuff series; /* the series so far */
16 fbuff time_stamps; /* the time stamps */
22 * init local state. can save a copy of the pointer to the
23 * series and time stamps, if desired
26 InitRunMean(fbuff series, fbuff time_stamps, char *params)
28 struct run_mean_state *state;
30 state = (struct run_mean_state *)
31 malloc(sizeof(struct run_mean_state));
39 * all functions take a forcb
41 state->series = series;
42 state->time_stamps = time_stamps;
46 return((char *)state);
50 FreeRunMean(char *state)
57 UpdateRunMean(char *state,
61 struct run_mean_state *s;
63 s = (struct run_mean_state *)state;
71 ForcRunMean(char *state, double *v)
74 struct run_mean_state *s = (struct run_mean_state *)state;
78 val = s->total / s->count;