X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcategory.h;h=f90ae7cd2809e9b3b96d8968de1c1f1ae71e0610;hb=b5c82cc9aabe7e641011130240ae1b2e84348e23;hp=6ef408577913207654bc77e5222edcd1e4fe7812;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp-builds.git diff --git a/src/data/category.h b/src/data/category.h index 6ef40857..f90ae7cd 100644 --- a/src/data/category.h +++ b/src/data/category.h @@ -32,7 +32,7 @@ #ifndef CATEGORY_H #define CATEGORY_H - +#include #include struct cat_vals; @@ -50,11 +50,20 @@ const union value *cat_subscript_to_value (const size_t, void cat_value_update (const struct variable *, const union value *); +/* + Return the count for the sth category. +*/ +size_t +cat_get_category_count (const size_t, const struct variable *); /* Return the number of categories of a categorical variable. */ size_t cat_get_n_categories (const struct variable *v); - +/* + If VAR is categorical with d categories, its first category should + correspond to the origin in d-dimensional Euclidean space. + */ +bool cat_is_origin (const struct variable *, const union value *); #endif