X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgroup.h;h=984523574212b27976f1da54f3adc58b7a97047d;hb=f62199cac6213ed1c03ffe48450a583da0fadc68;hp=951e58eda4ab02744bafe6d9cf48737150a10746;hpb=205eaea8e2d95e20baa2c00a495b0ac4f9646372;p=pspp-builds.git diff --git a/src/group.h b/src/group.h index 951e58ed..98452357 100644 --- a/src/group.h +++ b/src/group.h @@ -17,20 +17,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #ifndef GROUP_H #define GROUP_H -#include "val.h" - -enum comparison - { - CMP_LE = -2, - CMP_LT = -1, - CMP_EQ = 0, - CMP_GT = 1, - CMP_GE = 2 - }; +#include "val.h" /* Statistics for grouped data */ @@ -39,11 +31,6 @@ struct group_statistics /* The value of the independent variable for this group */ union value id; - /* The criterium matching for comparing with id - (applicable only to T-TEST) FIXME: therefore it shouldn't be here - */ - enum comparison criterion; - /* The arithmetic mean */ double mean; @@ -85,4 +72,20 @@ struct group_statistics }; + + +/* These funcs are usefull for hash tables */ + +/* Return -1 if the id of a is less than b; +1 if greater than and + 0 if equal */ +int compare_group(const struct group_statistics *a, + const struct group_statistics *b, + int width); + +unsigned hash_group(const struct group_statistics *g, int width); + +void free_group(struct group_statistics *v, void *aux); + + + #endif