X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Flevene.c;h=89f635628029f3831fecbf5babd5115e6fc6e255;hb=e870838d34e5e0133997434d27035054c605fb4f;hp=5193c86a1a453f001456ecc7f747870cf346548b;hpb=d0dc2e01dc5f60df296c657b7ceeaf0f3624cfb9;p=pspp diff --git a/src/math/levene.c b/src/math/levene.c index 5193c86a1a..89f6356280 100644 --- a/src/math/levene.c +++ b/src/math/levene.c @@ -45,7 +45,7 @@ struct levene /* Width of the categorical variable */ int gvw ; - /* The value deviding the the groups. Valid only for dichotomous categorical variable.*/ + /* The value dividing the groups. Valid only for dichotomous categorical variable.*/ const union value *cutpoint; @@ -110,7 +110,6 @@ find_group (const struct levene *nl, const union value *target) { if (nl->cmp (nl, &l->group, target)) break; - l = NULL; } return l; } @@ -134,12 +133,12 @@ levene_create (int indep_width, const union value *cutpoint) /* Data accumulation. First pass */ -void +void levene_pass_one (struct levene *nl, double value, double weight, const union value *gv) { struct lev *lev = find_group (nl, gv); - if ( nl->pass == 0 ) + if ( nl->pass == 0 ) { nl->pass = 1; } @@ -160,7 +159,7 @@ levene_pass_one (struct levene *nl, double value, double weight, const union val } /* Data accumulation. Second pass */ -void +void levene_pass_two (struct levene *nl, double value, double weight, const union value *gv) { struct lev *lev = NULL; @@ -186,7 +185,7 @@ levene_pass_two (struct levene *nl, double value, double weight, const union val } /* Data accumulation. Third pass */ -void +void levene_pass_three (struct levene *nl, double value, double weight, const union value *gv) { double z; @@ -244,7 +243,7 @@ levene_calculate (struct levene *nl) } numerator *= nn - hmap_count (&nl->hmap); - + return numerator / nl->denominator; }