struct glm_workspace ws;
struct covariance *cov;
- ws.cats = categoricals_create (cmd->design_vars, cmd->n_design_vars,
+
+ ws.cats = categoricals_create (cmd->interactions, cmd->n_interactions,
cmd->wv, cmd->exclude,
NULL, NULL, NULL, NULL);
for (v = 0; v < cmd->n_vars; ++v)
{
- ws.vws[v].cat = categoricals_create (&cmd->indep_var, 1, cmd->wv,
+ struct interaction *inter = interaction_create (cmd->indep_var);
+ ws.vws[v].cat = categoricals_create (&inter, 1, cmd->wv,
cmd->exclude, makeit, updateit,
CONST_CAST (struct variable *,
cmd->vars[v]),
#include <config.h>
#include "math/categoricals.h"
+#include "math/interaction.h"
#include <stdio.h>
struct categoricals *
-categoricals_create (const struct variable *const *v, size_t n_vars,
+categoricals_create (const struct interaction **inter, size_t n_inter,
const struct variable *wv, enum mv_class exclude,
user_data_create_func *udf,
update_func *update, void *aux1, void *aux2
size_t i;
struct categoricals *cat = xmalloc (sizeof *cat);
- cat->n_vp = n_vars;
+ cat->n_vp = n_inter;
cat->wv = wv;
cat->n_cats_total = 0;
cat->n_vars = 0;
for (i = 0 ; i < cat->n_vp; ++i)
{
hmap_init (&cat->vp[i].map);
- cat->vp[i].var = v[i];
+ cat->vp[i].var = inter[i]->vars[0];
}
return cat;
struct categoricals;
struct variable;
struct ccase;
+struct interaction;
union value ;
typedef void *user_data_create_func (void *aux1, void *aux2);
-struct categoricals *categoricals_create (const struct variable *const *v, size_t n_vars,
+struct categoricals *categoricals_create (const struct interaction **, size_t n_int,
const struct variable *wv, enum mv_class exclude,
user_data_create_func *udf,
update_func *update, void *aux1, void *aux2);