X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=src%2Fmath%2Fdesign-matrix.c;h=8f125c58b1e734d3b5d38ce1262e1e4477280edd;hp=030efd7a2d3316ac23989b0a5ab5de38473cc4d2;hb=124dea11f9542304e35bef92b7f3a46d5afca4d7;hpb=b37406b991b46c636e3f0cbf0d274b11335cb6e1 diff --git a/src/math/design-matrix.c b/src/math/design-matrix.c index 030efd7a..8f125c58 100644 --- a/src/math/design-matrix.c +++ b/src/math/design-matrix.c @@ -281,23 +281,6 @@ design_matrix_set_element (const struct design_matrix *d, size_t row, size_t col { gsl_matrix_set (d->m, row, col, x); } -/* - If VAR is categorical with d categories, its first category should - correspond to the origin in d-dimensional Euclidean space. - */ -static bool -is_origin (const struct variable *var, const union value *val) -{ - if (var_is_numeric (var)) - { - return false; - } - if (cat_value_find (var, val) == 0) - { - return true; - } - return false; -} /* Return the subscript of the column of the design matrix @@ -314,7 +297,7 @@ dm_get_exact_subscript (const struct design_matrix *dm, const struct variable *v result = design_matrix_var_to_column (dm, var); if (var_is_alpha (var)) { - if (is_origin (var, val)) + if (cat_is_origin (var, val)) { return -1u; }