X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fruns.c;h=b42eeafcecd38f2ce3486bfc9bd9e24f16dfb736;hb=8af509abbd66b6902cbbd1dd3fcc678e85456e39;hp=d12bd0d2b52a7239c5d4866bc726edc941e5f6a2;hpb=7919fa5fc1f94ad0097507d20e2deea52ed06df8;p=pspp diff --git a/src/language/stats/runs.c b/src/language/stats/runs.c index d12bd0d2b5..b42eeafcec 100644 --- a/src/language/stats/runs.c +++ b/src/language/stats/runs.c @@ -143,9 +143,9 @@ runs_execute (const struct dataset *ds, struct ccase *c; for (; (c = casereader_read (group)); case_unref (c)) { - const double w = weight ? case_data (c, weight)->f: 1.0; + const double w = weight ? case_num (c, weight) : 1.0; const union value *val = case_data (c, var); - if (var_is_value_missing (var, val, exclude)) + if (var_is_value_missing (var, val) & exclude) continue; x = val->f; cc += w; @@ -191,8 +191,8 @@ runs_execute (const struct dataset *ds, for (; (c = casereader_read (reader));) { const union value *val = case_data (c, var); - const double w = weight ? case_data (c, weight)->f: 1.0; - if (var_is_value_missing (var, val, exclude)) + const double w = weight ? case_num (c, weight) : 1.0; + if (var_is_value_missing (var, val) & exclude) { case_unref (c); continue; @@ -224,7 +224,7 @@ runs_execute (const struct dataset *ds, struct casereader *reader = casereader_clone (input); for (; (c = casereader_read (reader)); case_unref (c)) { - const double w = weight ? case_data (c, weight)->f: 1.0; + const double w = weight ? case_num (c, weight) : 1.0; for (v = 0; v < otp->n_vars; ++v) { const struct variable *var = otp->vars[v]; @@ -232,7 +232,7 @@ runs_execute (const struct dataset *ds, const double x = val->f; struct run_state *run = &rs[v]; - if (var_is_value_missing (var, val, exclude)) + if (var_is_value_missing (var, val) & exclude) continue; run->cutpoint += x * w; @@ -260,7 +260,7 @@ runs_execute (const struct dataset *ds, for (; (c = casereader_read (input)); case_unref (c)) { - const double w = weight ? case_data (c, weight)->f: 1.0; + const double w = weight ? case_num (c, weight) : 1.0; for (v = 0; v < otp->n_vars; ++v) { @@ -271,7 +271,7 @@ runs_execute (const struct dataset *ds, double d = x - run->cutpoint; short sign = 0; - if (var_is_value_missing (var, val, exclude)) + if (var_is_value_missing (var, val) & exclude) continue; if (d >= 0)