X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcategoricals.h;h=5e49b4504ab1b9338c19fe089b861fa8d82a328f;hb=5cab4cf3322f29c0ed7134d23740e07382914f20;hp=4ab17299a7a1ad427103afd23023aee1de5e664b;hpb=37f0de7f0ee1870cf5fd4b802be092be844a5b95;p=pspp diff --git a/src/math/categoricals.h b/src/math/categoricals.h index 4ab17299a7..5e49b4504a 100644 --- a/src/math/categoricals.h +++ b/src/math/categoricals.h @@ -62,7 +62,7 @@ void categoricals_update (struct categoricals *, const struct ccase *); void categoricals_done (const struct categoricals *); bool categoricals_is_complete (const struct categoricals *); -/* Counting categories. +/* Categories. A variable's number of categories is the number of unique values observed in the data passed to categoricals_update(). @@ -76,6 +76,9 @@ bool categoricals_is_complete (const struct categoricals *); size_t categoricals_n_count (const struct categoricals *, size_t idx); size_t categoricals_n_total (const struct categoricals *); +union value *categoricals_get_var_values (const struct categoricals *, + const struct variable *, size_t *n); + /* Degrees of freedom. A categorical variable with N_CATS categories has N_CATS - 1 degrees of @@ -142,6 +145,9 @@ const struct ccase *categoricals_get_case_by_category_real ( void *categoricals_get_user_data_by_category_real ( const struct categoricals *, int iact, int n); +int categoricals_get_value_index_by_category_real ( + const struct categoricals *, int iact_idx, int cat_idx, int var_idx); + void *categoricals_get_user_data_by_category (const struct categoricals *, int category); const struct ccase *categoricals_get_case_by_category (