Remove unused function
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 11 Jul 2011 15:38:22 +0000 (17:38 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 26 Jul 2011 10:36:38 +0000 (12:36 +0200)
src/math/categoricals.c
src/math/categoricals.h
src/math/covariance.c

index a3078d36384208024f92379c41e5b6a3dd85344f..9256fd6214f192c927a41aa6af1710edb732df9f 100644 (file)
@@ -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)
index 1a698dea72c247f48de1f183734bc82db27a33b8..d9ac1f5efe6c17dfdd347733e453b252c092feea 100644 (file)
@@ -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);
 
index 5dc1782638aff4f294253fd20d87c4e6b2e4c426..1a39335108693dd2754ded021c08082cbc6c524a 100644 (file)
@@ -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);