Rewrote the EXAMINE command.
[pspp-builds.git] / src / math / order-stats.h
1 /* PSPP - a program for statistical analysis.
2    Copyright (C) 2004, 2008 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU 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, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef __ORDER_STATS_H__
18 #define __ORDER_STATS_H__
19
20 #include <stddef.h>
21 #include <math/statistic.h>
22
23 struct casereader;
24 struct variable;
25
26 /*
27   cc <= tc < cc_p1
28 */
29 struct k
30 {
31   double tc;
32
33   double cc;
34
35   double cc_p1;
36
37   double c;
38
39   double c_p1;
40
41   double y;
42
43   double y_p1;
44 };
45
46
47 struct order_stats
48 {
49   struct statistic parent;
50   int n_k;
51   struct k *k;
52 };
53
54
55
56 void dump_ptile_k1 (const struct order_stats *ptl);
57
58 void dump_ptile_k2 (const struct order_stats *ptl);
59
60
61 void order_stats_accumulate (struct order_stats **ptl, size_t nos,
62                          struct casereader *reader,
63                          const struct variable *wv,
64                          const struct variable *var);
65
66 #endif