/* PSPP - a program for statistical analysis.
- Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "math/categoricals.h"
#include "math/interaction.h"
+#include <float.h>
#include <stdio.h>
#include "data/case.h"
if (vn->var == var)
break;
- fprintf (stderr, "Warning: Hash table collision\n");
+ fprintf (stderr, "%s:%d Warning: Hash table collision\n", __FILE__, __LINE__);
}
return vn;
/* A map of cases indexed by a interaction_value */
struct hmap ivmap;
- struct interaction *iact;
+ const struct interaction *iact;
int base_subscript_short;
int base_subscript_long;
}
printf ("\n");
- printf ("Number of interactions %d\n", cat->n_iap);
+ printf ("Number of interactions %zu\n", cat->n_iap);
for (i = 0 ; i < cat->n_iap; ++i)
{
int v;
assert (vn->var == var);
- printf ("%g(%d)", val->f, valn->index);
+ printf ("%.*g(%d)", DBL_DIG + 1, val->f, valn->index);
if (vv < iact->n_vars - 1)
printf (", ");
}
int i;
if (NULL == cat)
return;
+
for (i = 0; i < cat->n_iap; ++i)
{
struct interaction_value *iv = NULL;
free (cat->iap[i].enc_sum);
free (cat->iap[i].df_prod);
hmap_destroy (&cat->iap[i].ivmap);
- interaction_destroy (cat->iap[i].iact);
}
/* Interate over each variable and delete its value map */