From: John Darrington Date: Mon, 11 Jul 2011 15:38:22 +0000 (+0200) Subject: Remove unused function X-Git-Tag: v0.7.9~196 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13a15a585b06cb5be411fdc48dba946079d5a437;p=pspp-builds.git Remove unused function --- diff --git a/src/math/categoricals.c b/src/math/categoricals.c index a3078d36..9256fd62 100644 --- a/src/math/categoricals.c +++ b/src/math/categoricals.c @@ -403,16 +403,6 @@ reverse_variable_lookup_long (const struct categoricals *cat, int subscript) } - -/* Return the categorical variable corresponding to SUBSCRIPT */ -const struct variable * -categoricals_get_variable_by_subscript (const struct categoricals *cat, int subscript) -{ - int index = reverse_variable_lookup_short (cat, subscript); - - return cat->vp[index].iact->vars[0]; -} - /* Return the interaction corresponding to SUBSCRIPT */ const struct interaction * categoricals_get_interaction_by_subscript (const struct categoricals *cat, int subscript) diff --git a/src/math/categoricals.h b/src/math/categoricals.h index 1a698dea..d9ac1f5e 100644 --- a/src/math/categoricals.h +++ b/src/math/categoricals.h @@ -76,8 +76,6 @@ void categoricals_done (const struct categoricals *cat); the total number of distinct values of each categorical variable should be considered. */ -const struct variable * categoricals_get_variable_by_subscript (const struct categoricals *cat, int subscript); - double categoricals_get_weight_by_subscript (const struct categoricals *cat, int subscript); const struct interaction *categoricals_get_interaction_by_subscript (const struct categoricals *cat, int subscript); diff --git a/src/math/covariance.c b/src/math/covariance.c index 5dc17826..1a393351 100644 --- a/src/math/covariance.c +++ b/src/math/covariance.c @@ -25,6 +25,7 @@ #include "libpspp/assertion.h" #include "libpspp/misc.h" #include "math/categoricals.h" +#include "math/interaction.h" #include "math/moments.h" #include "gl/xalloc.h" @@ -247,7 +248,7 @@ is_missing (const struct covariance *cov, int i, const struct ccase *c) { const struct variable *var = i < cov->n_vars ? cov->vars[i] : - categoricals_get_variable_by_subscript (cov->categoricals, i - cov->n_vars); + categoricals_get_interaction_by_subscript (cov->categoricals, i - cov->n_vars)->vars[0]; const union value *val = case_data (c, var);