71a3c1745c88f3caee111a406315c1aa0bf49ce8
[pspp] / src / language / stats / chisquare.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 2006 Free Software Foundation, Inc.
3
4    This program is free software; you can redistribute it and/or
5    modify it under the terms of the GNU General Public License as
6    published by the Free Software Foundation; either version 2 of the
7    License, or (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17    02110-1301, USA. */
18
19 #if !chisquare_h
20 #define chisquare_h 1
21
22 #include <config.h>
23 #include <stddef.h>
24 #include <stdbool.h>
25
26 #include "npar.h"
27 struct chisquare_test
28 {
29   struct one_sample_test parent;  
30
31   bool ranged ;     /* True if this test has a range specified */
32
33   int lo;           /* Lower bound of range (undefined if RANGED is false) */
34   int hi;           /* Upper bound of range (undefined if RANGED is false) */
35
36   double *expected; 
37   int n_expected;
38 };
39
40 struct casefile;
41 struct dictionary ;
42 struct hsh_table;
43
44 void chisquare_insert_variables (const struct npar_test *test,
45                                  struct hsh_table *variables);
46
47
48 void chisquare_execute (const struct dataset *ds, 
49                         const struct casefile *cf, 
50                         struct casefilter *filter,
51                         const struct npar_test *test);
52
53
54
55 #endif