X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffactor_stats.h;h=259694e8fc5aafd2d982404b57f958a1f2e86d6e;hb=b7e33825d30a18360f24a18faf4b7d2e9efb8142;hp=d29ca4d80a39ae530d6de7415ad70a38d18fb3c1;hpb=5501903810bcbae487b12bc44d9cbedf29644d96;p=pspp diff --git a/src/factor_stats.h b/src/factor_stats.h index d29ca4d80a..259694e8fc 100644 --- a/src/factor_stats.h +++ b/src/factor_stats.h @@ -27,7 +27,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "hash.h" #include "val.h" +#include #include +#include "subclist.h" +#include "percentiles.h" struct moments1; @@ -58,22 +61,32 @@ struct metrics double trimmed_mean; - /* A hash of data for this factor. - */ + /* A hash of data for this factor. */ struct hsh_table *ordered_data; /* A Pointer to this hash table AFTER it has been SORTED and crunched */ struct weighted_value **wvp; - /* The number of values in the above array (if all the weights are 1, then this will be the same as n) */ int n_data; -}; + /* Percentile stuff */ + + /* A hash of struct percentiles */ + struct hsh_table *ptile_hash; + /* Algorithm to be used for calculating percentiles */ + enum pc_alg ptile_alg; + /* Tukey's Hinges */ + double hinge[3]; + +}; + + +struct metrics * metrics_create(void); void metrics_precalc(struct metrics *m); @@ -82,6 +95,9 @@ void metrics_calc(struct metrics *m, const union value *f, double weight, void metrics_postcalc(struct metrics *m); +void metrics_destroy(struct metrics *m); + + /* Linked list of case nos */ struct case_node @@ -123,6 +139,8 @@ struct factor_statistics { /* The an array stats for this factor, one for each dependent var */ struct metrics *m; + /* The number of dependent variables */ + int n_var; };