You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
433 B
25 lines
433 B
#ifndef lcthw_stats_h
|
|
#define lcthw_stats_h
|
|
|
|
typedef struct Stats {
|
|
double sum;
|
|
double sumsq;
|
|
unsigned long n;
|
|
double min;
|
|
double max;
|
|
} Stats;
|
|
|
|
Stats *Stats_recreate(double sum, double sumsq, unsigned long n,
|
|
double min, double max);
|
|
|
|
Stats *Stats_create();
|
|
|
|
double Stats_mean(Stats * st);
|
|
|
|
double Stats_stddev(Stats * st);
|
|
|
|
void Stats_sample(Stats * st, double s);
|
|
|
|
void Stats_dump(Stats * st);
|
|
|
|
#endif
|
|
|