From: John Darrington Date: Wed, 10 Jun 2009 01:44:01 +0000 (+0800) Subject: Added stub for ROC computation X-Git-Tag: build37~50^2~26 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10a86d1d80d73798fe2738ccc8560c68bf7a004a;p=pspp-builds.git Added stub for ROC computation --- diff --git a/src/language/stats/roc.c b/src/language/stats/roc.c index ba7ad3ce..81f06293 100644 --- a/src/language/stats/roc.c +++ b/src/language/stats/roc.c @@ -22,6 +22,9 @@ #include #include +#include +#include + #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid @@ -52,6 +55,7 @@ struct cmd_roc }; +static int run_roc (struct dataset *ds, struct cmd_roc *roc); int cmd_roc (struct lexer *lexer, struct dataset *ds) @@ -242,7 +246,40 @@ cmd_roc (struct lexer *lexer, struct dataset *ds) } } + run_roc (ds, &roc); return 1; } + + + +static void +do_roc (struct cmd_roc *roc, struct casereader *group, struct dictionary *dict); + + +static int +run_roc (struct dataset *ds, struct cmd_roc *roc) +{ + struct dictionary *dict = dataset_dict (ds); + bool ok; + struct casereader *group; + + struct casegrouper *grouper = casegrouper_create_splits (proc_open (ds), dict); + while (casegrouper_get_next_group (grouper, &group)) + { + do_roc (roc, group, dataset_dict (ds)); + casereader_destroy (group); + } + ok = casegrouper_destroy (grouper); + ok = proc_commit (ds) && ok; + + return ok; +} + + +static void +do_roc (struct cmd_roc *roc, struct casereader *group, struct dictionary *dict) +{ +} +