struct interact_params
{
- /* A map indexed by a interaction_value */
+ /* A map of cases indexed by a interaction_value */
struct hmap ivmap;
struct interaction *iact;
HMAP_FOR_EACH (iv, struct interaction_value, node, &cat->iap[i].ivmap)
{
if (cat->payload && cat->payload->destroy)
- cat->payload->destroy (cat->aux1, iv->user_data);
+ cat->payload->destroy (cat->aux1, cat->aux2, iv->user_data);
case_unref (iv->ccase);
}
{
int i;
struct variable_node *vn = NULL;
+
+ if (NULL == cat)
+ return;
+
const double weight = cat->wv ? case_data (c, cat->wv)->f : 1.0;
assert (NULL == cat->reverse_variable_map_short);
size_t
categoricals_df_total (const struct categoricals *cat)
{
+ if (NULL == cat)
+ return 0;
+
return cat->df_sum;
}
int i;
int idx_short = 0;
int idx_long = 0;
+
+ if (NULL == cat)
+ return;
+
cat->df_sum = 0;
cat->n_cats_total = 0;
HMAP_FOR_EACH (ivn, struct interaction_value, node, &iap->ivmap)
{
iap->reverse_interaction_value_map[x++] = ivn;
-
}
assert (x <= iap->n_cats);