}
-
-/* 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)
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);
#include "libpspp/assertion.h"
#include "libpspp/misc.h"
#include "math/categoricals.h"
+#include "math/interaction.h"
#include "math/moments.h"
#include "gl/xalloc.h"
{
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);