- const struct variable *var = iact->vars[vv];
- const union value *val = case_data (iv->ccase, var);
-
- printf ("%g", val->f);
- if (vv < iact->n_vars - 1)
- printf (", ");
+ int vv;
+ const struct interaction_value *iv = iap->reverse_interaction_value_map[v];
+
+ if (v > 0) printf (" ");
+ printf ("{");
+ for (vv = 0; vv < iact->n_vars; ++vv)
+ {
+ const struct variable *var = iact->vars[vv];
+ const union value *val = case_data (iv->ccase, var);
+ unsigned int varhash = hash_pointer (var, 0);
+ struct variable_node *vn = lookup_variable (&cat->varmap, var, varhash);
+
+ const int width = var_get_width (var);
+ unsigned int valhash = value_hash (val, width, 0);
+ struct value_node *valn = lookup_value (&vn->valmap, val, valhash, width);
+
+ assert (vn->var == var);
+
+ printf ("%.*g(%d)", DBL_DIG + 1, val->f, valn->index);
+ if (vv < iact->n_vars - 1)
+ printf (", ");
+ }
+ printf ("}");