lookup_case (const struct hmap *map, const struct interaction *iact, const struct ccase *c)
{
struct interaction_value *iv = NULL;
- size_t hash = interaction_case_hash (iact, c);
+ size_t hash = interaction_case_hash (iact, c, 0);
HMAP_FOR_EACH_WITH_HASH (iv, struct interaction_value, node, hash, map)
{
}
}
-
for (i = 0 ; i < cat->n_iap; ++i)
{
const struct interaction *iact = cat->iap[i].iact;
// if ( interaction_case_is_missing (iact, c, cat->exclude))
// continue;
- size_t hash = interaction_case_hash (iact, c);
+ size_t hash = interaction_case_hash (iact, c, 0);
struct interaction_value *node = lookup_case (&cat->iap[i].ivmap, iact, c);
if ( NULL == node)
}
unsigned int
-interaction_case_hash (const struct interaction *iact, const struct ccase *c)
+interaction_case_hash (const struct interaction *iact, const struct ccase *c, unsigned int base)
{
int i;
- size_t hash = 0;
+ size_t hash = base;
for (i = 0; i < iact->n_vars; ++i)
{
const struct variable *var = iact->vars[i];
struct ccase;
-unsigned int interaction_case_hash (const struct interaction *, const struct ccase *);
+unsigned int interaction_case_hash (const struct interaction *, const struct ccase *, unsigned int base);
bool interaction_case_equal (const struct interaction *, const struct ccase *, const struct ccase *);
bool interaction_case_is_missing (const struct interaction *, const struct ccase *, enum mv_class);
int interaction_case_cmp_3way (const struct interaction *, const struct ccase *, const struct ccase *);