Added result_class parameter to tab_double and updated all callers. Removed tab_fixed
[pspp] / src / language / stats / mann-whitney.c
index 18be7c148761dbbba3b5d51c913985f4fdfe4b93..81fe033af52ac9bb4cb8b995db7d6ddc03efae27 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include "mann-whitney.h"
+#include "language/stats/mann-whitney.h"
 
 #include <gsl/gsl_cdf.h>
 
-#include <libpspp/cast.h>
-#include <libpspp/misc.h>
-
-#include <math/sort.h>
-#include <data/case.h>
-#include <data/dictionary.h>
-#include <data/procedure.h>
-#include <data/casereader.h>
-#include <data/format.h>
-#include <data/variable.h>
+#include "data/case.h"
+#include "data/casereader.h"
+#include "data/dataset.h"
+#include "data/dictionary.h"
+#include "data/format.h"
+#include "data/variable.h"
+#include "libpspp/cast.h"
+#include "libpspp/misc.h"
+#include "math/sort.h"
+#include "output/tab.h"
 
 /* Calculates the adjustment necessary for tie compensation */
 static void
@@ -60,7 +60,7 @@ mann_whitney_execute (const struct dataset *ds,
                      enum mv_class exclude,
                      const struct npar_test *test,
                      bool exact,
-                     double timer)
+                     double timer UNUSED)
 {
   int i;
   const struct dictionary *dict = dataset_dict (ds);
@@ -147,7 +147,6 @@ mann_whitney_execute (const struct dataset *ds,
 
 \f
 
-#include <output/tab.h>
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -212,27 +211,27 @@ show_ranks_box (const struct n_sample_test *nst, const struct mw *mwv)
                var_to_string (nst->vars[i]));
 
       tab_double (table, 1, column_headers + i, 0,
-                 mw->n[0], 0);
+                 mw->n[0], NULL, RC_OTHER);
 
       tab_double (table, 2, column_headers + i, 0,
-                 mw->n[1], 0);
+                 mw->n[1], NULL, RC_OTHER);
 
       tab_double (table, 3, column_headers + i, 0,
-                 mw->n[1] + mw->n[0], 0);
+                 mw->n[1] + mw->n[0], NULL, RC_OTHER);
 
       /* Mean Ranks */
       tab_double (table, 4, column_headers + i, 0,
-                 mw->rank_sum[0] / mw->n[0], 0);
+                 mw->rank_sum[0] / mw->n[0], NULL, RC_OTHER);
 
       tab_double (table, 5, column_headers + i, 0,
-                 mw->rank_sum[1] / mw->n[1], 0);
+                 mw->rank_sum[1] / mw->n[1], NULL, RC_OTHER);
 
       /* Sum of Ranks */
       tab_double (table, 6, column_headers + i, 0,
-                 mw->rank_sum[0], 0);
+                 mw->rank_sum[0], NULL, RC_OTHER);
 
       tab_double (table, 7, column_headers + i, 0,
-                 mw->rank_sum[1], 0);
+                 mw->rank_sum[1], NULL, RC_OTHER);
     }
 
   tab_submit (table);
@@ -281,16 +280,16 @@ show_statistics_box (const struct n_sample_test *nst, const struct mw *mwv, bool
                var_to_string (nst->vars[i]));
 
       tab_double (table, 1, column_headers + i, 0,
-                 mw->u, 0);
+                 mw->u, NULL, RC_OTHER);
 
       tab_double (table, 2, column_headers + i, 0,
-                 mw->w, 0);
+                 mw->w, NULL, RC_OTHER);
 
       tab_double (table, 3, column_headers + i, 0,
-                 mw->z, 0);
+                 mw->z, NULL, RC_OTHER);
 
       tab_double (table, 4, column_headers + i, 0,
-                 2.0 * gsl_cdf_ugaussian_P (mw->z), 0);
+                 2.0 * gsl_cdf_ugaussian_P (mw->z), NULL, RC_PVALUE);
     }
 
   tab_submit (table);