X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcategoricals.c;h=ba616be3bb06531725d96e144c8b131a515dde1c;hb=a1f410c3ad34e83d60eb8c038946d8a0c72ce0d3;hp=b78fe9bf68e66dd89e03de3dc128599f8c2a2414;hpb=c2dbc834863c3088991bc2f6f6e32c595e7f1079;p=pspp-builds.git diff --git a/src/math/categoricals.c b/src/math/categoricals.c index b78fe9bf..ba616be3 100644 --- a/src/math/categoricals.c +++ b/src/math/categoricals.c @@ -414,7 +414,10 @@ categoricals_update (struct categoricals *cat, const struct ccase *c) cat->iap[i].cc += weight; if (cat->payload) - cat->payload->update (cat->aux1, cat->aux2, node->user_data, c, cat->exclude, cat->wv); + { + double weight = cat->wv ? case_data (c, cat->wv)->f : 1.0; + cat->payload->update (cat->aux1, cat->aux2, node->user_data, c, weight); + } } }