+ const struct interact_params *vp = &cat->iap[iact];
+
+ if ( n >= hmap_count (&vp->ivmap))
+ return NULL;
+
+ vn = vp->reverse_interaction_value_map [n];
+
+ return vn->ccase;
+}
+
+/* Return a the user data corresponding to the Nth Category of the IACTth interaction. */
+void *
+categoricals_get_user_data_by_category_real (const struct categoricals *cat, int iact, int n)
+{
+ const struct interact_params *vp = &cat->iap[iact];
+ const struct interaction_value *iv ;
+
+ if ( n >= hmap_count (&vp->ivmap))
+ return NULL;
+
+ iv = vp->reverse_interaction_value_map [n];
+
+ return iv->user_data;
+}
+
+
+
+/* Return a case containing the set of values corresponding to SUBSCRIPT */
+const struct ccase *
+categoricals_get_case_by_category (const struct categoricals *cat, int subscript)
+{
+ int vindex = reverse_variable_lookup_long (cat, subscript);
+ const struct interact_params *vp = &cat->iap[vindex];
+ const struct interaction_value *vn = vp->reverse_interaction_value_map [subscript - vp->base_subscript_long];
+
+ return vn->ccase;
+}
+
+void *
+categoricals_get_user_data_by_category (const struct categoricals *cat, int subscript)
+{
+ int vindex = reverse_variable_lookup_long (cat, subscript);
+ const struct interact_params *vp = &cat->iap[vindex];
+
+ const struct interaction_value *iv = vp->reverse_interaction_value_map [subscript - vp->base_subscript_long];
+ return iv->user_data;
+}
+
+
+\f
+
+void
+categoricals_set_payload (struct categoricals *cat, const struct payload *p,
+ const void *aux1, void *aux2)
+{
+ cat->payload = p;
+ cat->aux1 = aux1;
+ cat->aux2 = aux2;