projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tue Oct 31 19:29:05 2006 Ben Pfaff <blp@gnu.org>
[pspp-builds.git]
/
src
/
math
/
levene.c
diff --git
a/src/math/levene.c
b/src/math/levene.c
index 105fc09303e5cce49bd797f1c9509a3278e77408..8fb41fed11db2ac52922c5095ae4e32765e9cd62 100644
(file)
--- a/
src/math/levene.c
+++ b/
src/math/levene.c
@@
-21,17
+21,17
@@
#include <config.h>
#include "levene.h"
#include <config.h>
#include "levene.h"
-#include
"message.h"
-#include
"case.h"
-#include
"casefile.h"
-#include
"dictionary.h"
+#include
<libpspp/message.h>
+#include
<data/case.h>
+#include
<data/casefile.h>
+#include
<data/dictionary.h>
#include "group-proc.h"
#include "group-proc.h"
-#include
"hash.h"
-#include
"str.h"
-#include
"variable.h"
-#include
"procedure.h"
-#include
"alloc.h"
-#include
"misc.h"
+#include
<libpspp/hash.h>
+#include
<libpspp/str.h>
+#include
<data/variable.h>
+#include
<data/procedure.h>
+#include
<libpspp/alloc.h>
+#include
<libpspp/misc.h>
#include "group.h"
#include <math.h>
#include "group.h"
#include <math.h>
@@
-82,20
+82,21
@@
struct levene_info
/* First pass */
static void levene_precalc (const struct levene_info *l);
/* First pass */
static void levene_precalc (const struct levene_info *l);
-static int levene_calc (const struct ccase *, void *);
+static int levene_calc (const struct
dictionary *dict, const struct
ccase *, void *);
static void levene_postcalc (void *);
/* Second pass */
static void levene2_precalc (void *);
static void levene_postcalc (void *);
/* Second pass */
static void levene2_precalc (void *);
-static int levene2_calc (const struct ccase *, void *);
+static int levene2_calc (const struct
dictionary *,const struct
ccase *, void *);
static void levene2_postcalc (void *);
void
static void levene2_postcalc (void *);
void
-levene(const struct casefile *cf,
+levene(const struct dictionary *dict,
+ const struct casefile *cf,
struct variable *v_indep, size_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)
+ enum lev_missing missing, is_missing_func value_is_missing)
{
struct casereader *r;
struct ccase c;
{
struct casereader *r;
struct ccase c;
@@
-114,7
+115,7
@@
levene(const struct casefile *cf,
casereader_read (r, &c) ;
case_destroy (&c))
{
casereader_read (r, &c) ;
case_destroy (&c))
{
- levene_calc
(
&c,&l);
+ levene_calc
(dict,
&c,&l);
}
casereader_destroy (r);
levene_postcalc(&l);
}
casereader_destroy (r);
levene_postcalc(&l);
@@
-124,7
+125,7
@@
levene(const struct casefile *cf,
casereader_read (r, &c) ;
case_destroy (&c))
{
casereader_read (r, &c) ;
case_destroy (&c))
{
- levene2_calc
(
&c,&l);
+ levene2_calc
(dict,
&c,&l);
}
casereader_destroy (r);
levene2_postcalc(&l);
}
casereader_destroy (r);
levene2_postcalc(&l);
@@
-184,14
+185,14
@@
levene_precalc (const struct levene_info *l)
}
static int
}
static int
-levene_calc (const struct ccase *c, void *_l)
+levene_calc (const struct
dictionary *dict, const struct
ccase *c, void *_l)
{
size_t i;
{
size_t i;
-
int warn = 0
;
+
bool warn = false
;
struct levene_info *l = (struct levene_info *) _l;
const union value *gv = case_data (c, l->v_indep->fv);
struct group_statistics key;
struct levene_info *l = (struct levene_info *) _l;
const union value *gv = case_data (c, l->v_indep->fv);
struct group_statistics key;
- double weight = dict_get_case_weight
(default_dict,c,
&warn);
+ double weight = dict_get_case_weight
(dict, c,
&warn);
/* Skip the entire case if /MISSING=LISTWISE is set */
if ( l->missing == LEV_LISTWISE )
/* Skip the entire case if /MISSING=LISTWISE is set */
if ( l->missing == LEV_LISTWISE )
@@
-207,7
+208,6
@@
levene_calc (const struct ccase *c, void *_l)
}
}
}
}
}
}
-
key.id = *gv;
key.id = *gv;
@@
-288,14
+288,14
@@
levene2_precalc (void *_l)
}
static int
}
static int
-levene2_calc (const struct ccase *c, void *_l)
+levene2_calc (const struct
dictionary *dict, const struct
ccase *c, void *_l)
{
size_t i;
{
size_t i;
-
int warn = 0
;
+
bool warn = false
;
struct levene_info *l = (struct levene_info *) _l;
struct levene_info *l = (struct levene_info *) _l;
- double weight = dict_get_case_weight
(default_dict,c,
&warn);
+ double weight = dict_get_case_weight
(dict, c,
&warn);
const union value *gv = case_data (c, l->v_indep->fv);
struct group_statistics key;
const union value *gv = case_data (c, l->v_indep->fv);
struct group_statistics key;