1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
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.
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.
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/>. */
17 #ifndef __MATH_BOX_WHISKER_H__
18 #define __MATH_BOX_WHISKER_H__
21 #include "libpspp/ll.h"
22 #include "libpspp/str.h"
23 #include "math/order-stats.h"
25 /* This module calculates the statistics typically displayed by box-plots.
26 However, there's no reason not to use it for other purposes too.
42 struct order_stats parent
;
47 struct ll_list outliers
;
52 const struct variable
*id_var
;
55 struct box_whisker
* box_whisker_create (const struct tukey_hinges
*,
56 size_t id_idx
, const struct variable
*id_var
);
58 void box_whisker_whiskers (const struct box_whisker
*bw
, double whiskers
[2]);
60 void box_whisker_hinges (const struct box_whisker
*bw
, double hinges
[3]);
62 const struct ll_list
* box_whisker_outliers (const struct box_whisker
*bw
);