These asserted that the sum of case-weights of a dataset calculated
in one pass, was the same as that calculated in a second pass.
Algebraically this is correct. However, for optimisation purposes,
it is sometimes desireable that the second pass occurs after the
data has been reordered. If that happens, the sum of weights can
be slightly different due to floating point rounding errors. This
happens particularly when the caseweights are fractional.
}
else
{
- /* After the second pass we can calculate any stat. We
- don't support "online" computation during the second
- pass, so As a simple self-check, the total weight for
- the passes must agree. */
+ /* After the second pass we can calculate any stat. */
assert (m->pass == 2);
- assert (m->w1 == m->w2);
if (m->w2 > 0.)
{
struct percentile *mutable = CONST_CAST (struct percentile *, ptl);
const struct order_stats *os = &ptl->parent;
- assert (os->cc == ptl->w);
-
if ( ptl->g1 == SYSMIS)
mutable->g1 = (os->k[0].tc - os->k[0].cc) / os->k[0].c_p1;
{
const struct order_stats *os = (const struct order_stats *) tm;
- assert (os->cc == tm->w);
-
return
(
(os->k[0].cc_p1 - os->k[0].tc) * os->k[0].y_p1