From: Jason Stover Date: Mon, 9 Jan 2006 00:53:31 +0000 (+0000) Subject: Tidying types X-Git-Tag: v0.6.0~1095 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27e78ef2c46e4bffda87e6d334180373f479f272;p=pspp-builds.git Tidying types --- diff --git a/src/cat.c b/src/cat.c index c4bd17a8..9b8ed966 100644 --- a/src/cat.c +++ b/src/cat.c @@ -130,3 +130,13 @@ cat_subscript_to_value (const size_t s, struct variable *v) return NULL; } } + +/* + Return the number of categories of a categorical variable. + */ +size_t +cat_get_n_categories (const struct variable *v) +{ + return v->obs_vals->n_categories; +} + diff --git a/src/design-matrix.h b/src/design-matrix.h index 55e4c73c..8cd8195c 100644 --- a/src/design-matrix.h +++ b/src/design-matrix.h @@ -30,7 +30,7 @@ #include "cat-routines.h" struct design_matrix_var { - int first_column; /* First column for this variable in + size_t first_column; /* First column for this variable in the design_matix. If this variable is categorical, its values are stored in multiple, contiguous @@ -38,7 +38,7 @@ struct design_matrix_var encoding in the variable's struct cat_vals. */ - int last_column; + size_t last_column; const struct variable *v; }; struct design_matrix