X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffactor_stats.h;h=fcddb5f4720b6c64563f5db815a9a335c3192c81;hb=a489451ddf22935fcbe115aa4aa5869b29f18103;hp=c193f883e47384008781b39bd41333f0969990c5;hpb=f62199cac6213ed1c03ffe48450a583da0fadc68;p=pspp-builds.git diff --git a/src/factor_stats.h b/src/factor_stats.h index c193f883..fcddb5f4 100644 --- a/src/factor_stats.h +++ b/src/factor_stats.h @@ -28,16 +28,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "hash.h" #include "val.h" + +struct moments1; + struct metrics { double n; double n_missing; - double ssq; - - double sum; - double min; double max; @@ -50,6 +49,11 @@ struct metrics double stddev; + struct moments1 *moments; + + double skewness; + double kurtosis; + double trimmed_mean; /* A hash of data for this factor. @@ -111,7 +115,7 @@ void weighted_value_free(struct weighted_value *wv); struct factor_statistics { - /* The value of the independent variable */ + /* The values of the independent variables */ union value id[2]; /* The an array stats for this factor, one for each dependent var */ @@ -129,18 +133,15 @@ create_factor_statistics (int n, union value *id0, union value *id1); void factor_statistics_free(struct factor_statistics *f); +/* Compare f0 and f1. + width is the width of the independent variable */ int factor_statistics_compare(const struct factor_statistics *f0, - const struct factor_statistics *f1, void *aux); + const struct factor_statistics *f1, int width); unsigned int -factor_statistics_hash(const struct factor_statistics *f, void *aux); - - - - - +factor_statistics_hash(const struct factor_statistics *f, int width); #endif