X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcategory.h;h=9df3bd46e10b93a35bceef2ee335df8bc9524974;hb=13a7d7fb2c398784b25f7f5f363c3fd86dc93eed;hp=30ca272293d310f89f75e7c8abda9a00c0ce5eca;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp-builds.git diff --git a/src/data/category.h b/src/data/category.h index 30ca2722..9df3bd46 100644 --- a/src/data/category.h +++ b/src/data/category.h @@ -1,6 +1,5 @@ /* PSPP - Binary encodings for categorical variables. Copyright (C) 2005 Free Software Foundation, Inc. - Written by Jason H Stover . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -33,29 +32,26 @@ */ -#ifndef CAT_H -#define CAT_H -#define CAT_VALUE_NOT_FOUND -2 -#include +#ifndef CATEGORY_H +#define CATEGORY_H +#include -union value; +struct cat_vals; struct variable ; +union value; + +void cat_stored_values_create (const struct variable *); +void cat_stored_values_destroy (struct cat_vals *); + +size_t cat_value_find (const struct variable *, const union value *); + +const union value *cat_subscript_to_value (const size_t, + const struct variable *); + + +void cat_value_update (const struct variable *, const union value *); -/* - This structure contains the observed values of a - categorical variable. - */ -struct cat_vals -{ - union value *vals; - size_t n_categories; - size_t n_allocated_categories; /* This is used only during - initialization to keep - track of the number of - values stored. - */ -}; /* Return the number of categories of a categorical variable.