projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed some unnecessary #include directives
[pspp]
/
src
/
levene.c
diff --git
a/src/levene.c
b/src/levene.c
index 833a65e08df056e6c76ea1d6a3fac652c313f041..04f5a1de423d471c84b0321f7819d4c56939c6f3 100644
(file)
--- a/
src/levene.c
+++ b/
src/levene.c
@@
-68,7
+68,7
@@
struct levene_info
struct variable *v_indep;
/* Number of dependent variables */
struct variable *v_indep;
/* Number of dependent variables */
-
in
t n_dep;
+
size_
t n_dep;
/* The dependent variables */
struct variable **v_dep;
/* The dependent variables */
struct variable **v_dep;
@@
-77,8
+77,7
@@
struct levene_info
enum lev_missing missing;
/* Function to test for missing values */
enum lev_missing missing;
/* Function to test for missing values */
- is_missing_func is_missing;
-
+ is_missing_func *is_missing;
};
/* First pass */
};
/* First pass */
@@
-95,7
+94,7
@@
static void levene2_postcalc (void *);
void
levene(const struct casefile *cf,
void
levene(const struct casefile *cf,
- struct variable *v_indep,
in
t n_dep, struct variable **v_dep,
+ struct variable *v_indep,
size_
t n_dep, struct variable **v_dep,
enum lev_missing missing, is_missing_func value_is_missing)
{
struct casereader *r;
enum lev_missing missing, is_missing_func value_is_missing)
{
struct casereader *r;
@@
-157,7
+156,7
@@
static struct lz_stats *lz;
static void
levene_precalc (const struct levene_info *l)
{
static void
levene_precalc (const struct levene_info *l)
{
-
in
t i;
+
size_
t i;
lz = xmalloc (sizeof (struct lz_stats ) * l->n_dep ) ;
lz = xmalloc (sizeof (struct lz_stats ) * l->n_dep ) ;
@@
-187,7
+186,7
@@
levene_precalc (const struct levene_info *l)
static int
levene_calc (const struct ccase *c, void *_l)
{
static int
levene_calc (const struct ccase *c, void *_l)
{
-
in
t i;
+
size_
t i;
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
const union value *gv = case_data (c, l->v_indep->fv);
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
const union value *gv = case_data (c, l->v_indep->fv);
@@
-202,7
+201,7
@@
levene_calc (const struct ccase *c, void *_l)
struct variable *v = l->v_dep[i];
const union value *val = case_data (c, v->fv);
struct variable *v = l->v_dep[i];
const union value *val = case_data (c, v->fv);
- if (l->is_missing
(val,v
) )
+ if (l->is_missing
(&v->miss, val
) )
{
return 0;
}
{
return 0;
}
@@
-225,7
+224,7
@@
levene_calc (const struct ccase *c, void *_l)
if ( 0 == gs )
continue ;
if ( 0 == gs )
continue ;
- if ( ! l->is_missing(
v,var
))
+ if ( ! l->is_missing(
&var->miss, v
))
{
levene_z= fabs(v->f - gs->mean);
lz[i].grand_total += levene_z * weight;
{
levene_z= fabs(v->f - gs->mean);
lz[i].grand_total += levene_z * weight;
@@
-242,7
+241,7
@@
levene_calc (const struct ccase *c, void *_l)
static void
levene_postcalc (void *_l)
{
static void
levene_postcalc (void *_l)
{
-
in
t v;
+
size_
t v;
struct levene_info *l = (struct levene_info *) _l;
struct levene_info *l = (struct levene_info *) _l;
@@
-262,7
+261,7
@@
static double *lz_denominator;
static void
levene2_precalc (void *_l)
{
static void
levene2_precalc (void *_l)
{
-
in
t v;
+
size_
t v;
struct levene_info *l = (struct levene_info *) _l;
struct levene_info *l = (struct levene_info *) _l;
@@
-291,7
+290,7
@@
levene2_precalc (void *_l)
static int
levene2_calc (const struct ccase *c, void *_l)
{
static int
levene2_calc (const struct ccase *c, void *_l)
{
-
in
t i;
+
size_
t i;
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
@@
-309,7
+308,7
@@
levene2_calc (const struct ccase *c, void *_l)
struct variable *v = l->v_dep[i];
const union value *val = case_data (c, v->fv);
struct variable *v = l->v_dep[i];
const union value *val = case_data (c, v->fv);
- if (l->is_missing(
val,v
) )
+ if (l->is_missing(
&v->miss, val
) )
{
return 0;
}
{
return 0;
}
@@
-330,7
+329,7
@@
levene2_calc (const struct ccase *c, void *_l)
if ( 0 == gs )
continue;
if ( 0 == gs )
continue;
- if ( ! l->is_missing
(v,var
) )
+ if ( ! l->is_missing
(&var->miss, v
) )
{
levene_z = fabs(v->f - gs->mean);
lz_denominator[i] += weight * pow2(levene_z - gs->lz_mean);
{
levene_z = fabs(v->f - gs->mean);
lz_denominator[i] += weight * pow2(levene_z - gs->lz_mean);
@@
-344,7
+343,7
@@
levene2_calc (const struct ccase *c, void *_l)
static void
levene2_postcalc (void *_l)
{
static void
levene2_postcalc (void *_l)
{
-
in
t v;
+
size_
t v;
struct levene_info *l = (struct levene_info *) _l;
struct levene_info *l = (struct levene_info *) _l;