X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgroup.h;h=a066348646b2cd6f74633c6280d9eb93f8db592a;hb=bcf41af107e8dffb506a506f576c6535d1b3bde7;hp=951e58eda4ab02744bafe6d9cf48737150a10746;hpb=205eaea8e2d95e20baa2c00a495b0ac4f9646372;p=pspp diff --git a/src/group.h b/src/group.h index 951e58eda4..a066348646 100644 --- a/src/group.h +++ b/src/group.h @@ -14,23 +14,15 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, 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