X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgroup.h;h=954418a872af25dadb99378c227d31e19759afb5;hb=f1696fab032a5ae5c44e3a3dedba343fce9ffd5c;hp=951e58eda4ab02744bafe6d9cf48737150a10746;hpb=205eaea8e2d95e20baa2c00a495b0ac4f9646372;p=pspp diff --git a/src/group.h b/src/group.h index 951e58eda4..954418a872 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 useful 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