1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 4.0.1
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
6
7package Math::GSL::Statistics;
8use base qw(Exporter);
9use base qw(DynaLoader);
10package Math::GSL::Statisticsc;
11bootstrap Math::GSL::Statistics;
12package Math::GSL::Statistics;
13@EXPORT = qw();
14
15# ---------- BASE METHODS -------------
16
17package Math::GSL::Statistics;
18
19sub TIEHASH {
20    my ($classname,$obj) = @_;
21    return bless $obj, $classname;
22}
23
24sub CLEAR { }
25
26sub FIRSTKEY { }
27
28sub NEXTKEY { }
29
30sub FETCH {
31    my ($self,$field) = @_;
32    my $member_func = "swig_${field}_get";
33    $self->$member_func();
34}
35
36sub STORE {
37    my ($self,$field,$newval) = @_;
38    my $member_func = "swig_${field}_set";
39    $self->$member_func($newval);
40}
41
42sub this {
43    my $ptr = shift;
44    return tied(%$ptr);
45}
46
47
48# ------- FUNCTION WRAPPERS --------
49
50package Math::GSL::Statistics;
51
52*gsl_error = *Math::GSL::Statisticsc::gsl_error;
53*gsl_stream_printf = *Math::GSL::Statisticsc::gsl_stream_printf;
54*gsl_strerror = *Math::GSL::Statisticsc::gsl_strerror;
55*gsl_set_error_handler = *Math::GSL::Statisticsc::gsl_set_error_handler;
56*gsl_set_error_handler_off = *Math::GSL::Statisticsc::gsl_set_error_handler_off;
57*gsl_set_stream_handler = *Math::GSL::Statisticsc::gsl_set_stream_handler;
58*gsl_set_stream = *Math::GSL::Statisticsc::gsl_set_stream;
59*gsl_stats_mean = *Math::GSL::Statisticsc::gsl_stats_mean;
60*gsl_stats_variance = *Math::GSL::Statisticsc::gsl_stats_variance;
61*gsl_stats_sd = *Math::GSL::Statisticsc::gsl_stats_sd;
62*gsl_stats_variance_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_variance_with_fixed_mean;
63*gsl_stats_sd_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_sd_with_fixed_mean;
64*gsl_stats_tss = *Math::GSL::Statisticsc::gsl_stats_tss;
65*gsl_stats_tss_m = *Math::GSL::Statisticsc::gsl_stats_tss_m;
66*gsl_stats_absdev = *Math::GSL::Statisticsc::gsl_stats_absdev;
67*gsl_stats_skew = *Math::GSL::Statisticsc::gsl_stats_skew;
68*gsl_stats_kurtosis = *Math::GSL::Statisticsc::gsl_stats_kurtosis;
69*gsl_stats_lag1_autocorrelation = *Math::GSL::Statisticsc::gsl_stats_lag1_autocorrelation;
70*gsl_stats_covariance = *Math::GSL::Statisticsc::gsl_stats_covariance;
71*gsl_stats_correlation = *Math::GSL::Statisticsc::gsl_stats_correlation;
72*gsl_stats_spearman = *Math::GSL::Statisticsc::gsl_stats_spearman;
73*gsl_stats_variance_m = *Math::GSL::Statisticsc::gsl_stats_variance_m;
74*gsl_stats_sd_m = *Math::GSL::Statisticsc::gsl_stats_sd_m;
75*gsl_stats_absdev_m = *Math::GSL::Statisticsc::gsl_stats_absdev_m;
76*gsl_stats_skew_m_sd = *Math::GSL::Statisticsc::gsl_stats_skew_m_sd;
77*gsl_stats_kurtosis_m_sd = *Math::GSL::Statisticsc::gsl_stats_kurtosis_m_sd;
78*gsl_stats_lag1_autocorrelation_m = *Math::GSL::Statisticsc::gsl_stats_lag1_autocorrelation_m;
79*gsl_stats_covariance_m = *Math::GSL::Statisticsc::gsl_stats_covariance_m;
80*gsl_stats_wmean = *Math::GSL::Statisticsc::gsl_stats_wmean;
81*gsl_stats_wvariance = *Math::GSL::Statisticsc::gsl_stats_wvariance;
82*gsl_stats_wsd = *Math::GSL::Statisticsc::gsl_stats_wsd;
83*gsl_stats_wvariance_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_wvariance_with_fixed_mean;
84*gsl_stats_wsd_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_wsd_with_fixed_mean;
85*gsl_stats_wtss = *Math::GSL::Statisticsc::gsl_stats_wtss;
86*gsl_stats_wtss_m = *Math::GSL::Statisticsc::gsl_stats_wtss_m;
87*gsl_stats_wabsdev = *Math::GSL::Statisticsc::gsl_stats_wabsdev;
88*gsl_stats_wskew = *Math::GSL::Statisticsc::gsl_stats_wskew;
89*gsl_stats_wkurtosis = *Math::GSL::Statisticsc::gsl_stats_wkurtosis;
90*gsl_stats_wvariance_m = *Math::GSL::Statisticsc::gsl_stats_wvariance_m;
91*gsl_stats_wsd_m = *Math::GSL::Statisticsc::gsl_stats_wsd_m;
92*gsl_stats_wabsdev_m = *Math::GSL::Statisticsc::gsl_stats_wabsdev_m;
93*gsl_stats_wskew_m_sd = *Math::GSL::Statisticsc::gsl_stats_wskew_m_sd;
94*gsl_stats_wkurtosis_m_sd = *Math::GSL::Statisticsc::gsl_stats_wkurtosis_m_sd;
95*gsl_stats_pvariance = *Math::GSL::Statisticsc::gsl_stats_pvariance;
96*gsl_stats_ttest = *Math::GSL::Statisticsc::gsl_stats_ttest;
97*gsl_stats_max = *Math::GSL::Statisticsc::gsl_stats_max;
98*gsl_stats_min = *Math::GSL::Statisticsc::gsl_stats_min;
99*gsl_stats_minmax = *Math::GSL::Statisticsc::gsl_stats_minmax;
100*gsl_stats_max_index = *Math::GSL::Statisticsc::gsl_stats_max_index;
101*gsl_stats_min_index = *Math::GSL::Statisticsc::gsl_stats_min_index;
102*gsl_stats_minmax_index = *Math::GSL::Statisticsc::gsl_stats_minmax_index;
103*gsl_stats_select = *Math::GSL::Statisticsc::gsl_stats_select;
104*gsl_stats_median_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_median_from_sorted_data;
105*gsl_stats_median = *Math::GSL::Statisticsc::gsl_stats_median;
106*gsl_stats_quantile_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_quantile_from_sorted_data;
107*gsl_stats_trmean_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_trmean_from_sorted_data;
108*gsl_stats_gastwirth_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_gastwirth_from_sorted_data;
109*gsl_stats_mad0 = *Math::GSL::Statisticsc::gsl_stats_mad0;
110*gsl_stats_mad = *Math::GSL::Statisticsc::gsl_stats_mad;
111*gsl_stats_Sn0_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_Sn0_from_sorted_data;
112*gsl_stats_Sn_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_Sn_from_sorted_data;
113*gsl_stats_Qn0_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_Qn0_from_sorted_data;
114*gsl_stats_Qn_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_Qn_from_sorted_data;
115*gsl_stats_int_mean = *Math::GSL::Statisticsc::gsl_stats_int_mean;
116*gsl_stats_int_variance = *Math::GSL::Statisticsc::gsl_stats_int_variance;
117*gsl_stats_int_sd = *Math::GSL::Statisticsc::gsl_stats_int_sd;
118*gsl_stats_int_variance_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_int_variance_with_fixed_mean;
119*gsl_stats_int_sd_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_int_sd_with_fixed_mean;
120*gsl_stats_int_tss = *Math::GSL::Statisticsc::gsl_stats_int_tss;
121*gsl_stats_int_tss_m = *Math::GSL::Statisticsc::gsl_stats_int_tss_m;
122*gsl_stats_int_absdev = *Math::GSL::Statisticsc::gsl_stats_int_absdev;
123*gsl_stats_int_skew = *Math::GSL::Statisticsc::gsl_stats_int_skew;
124*gsl_stats_int_kurtosis = *Math::GSL::Statisticsc::gsl_stats_int_kurtosis;
125*gsl_stats_int_lag1_autocorrelation = *Math::GSL::Statisticsc::gsl_stats_int_lag1_autocorrelation;
126*gsl_stats_int_covariance = *Math::GSL::Statisticsc::gsl_stats_int_covariance;
127*gsl_stats_int_correlation = *Math::GSL::Statisticsc::gsl_stats_int_correlation;
128*gsl_stats_int_spearman = *Math::GSL::Statisticsc::gsl_stats_int_spearman;
129*gsl_stats_int_variance_m = *Math::GSL::Statisticsc::gsl_stats_int_variance_m;
130*gsl_stats_int_sd_m = *Math::GSL::Statisticsc::gsl_stats_int_sd_m;
131*gsl_stats_int_absdev_m = *Math::GSL::Statisticsc::gsl_stats_int_absdev_m;
132*gsl_stats_int_skew_m_sd = *Math::GSL::Statisticsc::gsl_stats_int_skew_m_sd;
133*gsl_stats_int_kurtosis_m_sd = *Math::GSL::Statisticsc::gsl_stats_int_kurtosis_m_sd;
134*gsl_stats_int_lag1_autocorrelation_m = *Math::GSL::Statisticsc::gsl_stats_int_lag1_autocorrelation_m;
135*gsl_stats_int_covariance_m = *Math::GSL::Statisticsc::gsl_stats_int_covariance_m;
136*gsl_stats_int_pvariance = *Math::GSL::Statisticsc::gsl_stats_int_pvariance;
137*gsl_stats_int_ttest = *Math::GSL::Statisticsc::gsl_stats_int_ttest;
138*gsl_stats_int_max = *Math::GSL::Statisticsc::gsl_stats_int_max;
139*gsl_stats_int_min = *Math::GSL::Statisticsc::gsl_stats_int_min;
140*gsl_stats_int_minmax = *Math::GSL::Statisticsc::gsl_stats_int_minmax;
141*gsl_stats_int_max_index = *Math::GSL::Statisticsc::gsl_stats_int_max_index;
142*gsl_stats_int_min_index = *Math::GSL::Statisticsc::gsl_stats_int_min_index;
143*gsl_stats_int_minmax_index = *Math::GSL::Statisticsc::gsl_stats_int_minmax_index;
144*gsl_stats_int_select = *Math::GSL::Statisticsc::gsl_stats_int_select;
145*gsl_stats_int_median_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_median_from_sorted_data;
146*gsl_stats_int_median = *Math::GSL::Statisticsc::gsl_stats_int_median;
147*gsl_stats_int_quantile_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_quantile_from_sorted_data;
148*gsl_stats_int_trmean_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_trmean_from_sorted_data;
149*gsl_stats_int_gastwirth_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_gastwirth_from_sorted_data;
150*gsl_stats_int_mad0 = *Math::GSL::Statisticsc::gsl_stats_int_mad0;
151*gsl_stats_int_mad = *Math::GSL::Statisticsc::gsl_stats_int_mad;
152*gsl_stats_int_Sn0_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_Sn0_from_sorted_data;
153*gsl_stats_int_Sn_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_Sn_from_sorted_data;
154*gsl_stats_int_Qn0_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_Qn0_from_sorted_data;
155*gsl_stats_int_Qn_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_int_Qn_from_sorted_data;
156*gsl_stats_char_mean = *Math::GSL::Statisticsc::gsl_stats_char_mean;
157*gsl_stats_char_variance = *Math::GSL::Statisticsc::gsl_stats_char_variance;
158*gsl_stats_char_sd = *Math::GSL::Statisticsc::gsl_stats_char_sd;
159*gsl_stats_char_variance_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_char_variance_with_fixed_mean;
160*gsl_stats_char_sd_with_fixed_mean = *Math::GSL::Statisticsc::gsl_stats_char_sd_with_fixed_mean;
161*gsl_stats_char_tss = *Math::GSL::Statisticsc::gsl_stats_char_tss;
162*gsl_stats_char_tss_m = *Math::GSL::Statisticsc::gsl_stats_char_tss_m;
163*gsl_stats_char_absdev = *Math::GSL::Statisticsc::gsl_stats_char_absdev;
164*gsl_stats_char_skew = *Math::GSL::Statisticsc::gsl_stats_char_skew;
165*gsl_stats_char_kurtosis = *Math::GSL::Statisticsc::gsl_stats_char_kurtosis;
166*gsl_stats_char_lag1_autocorrelation = *Math::GSL::Statisticsc::gsl_stats_char_lag1_autocorrelation;
167*gsl_stats_char_covariance = *Math::GSL::Statisticsc::gsl_stats_char_covariance;
168*gsl_stats_char_correlation = *Math::GSL::Statisticsc::gsl_stats_char_correlation;
169*gsl_stats_char_spearman = *Math::GSL::Statisticsc::gsl_stats_char_spearman;
170*gsl_stats_char_variance_m = *Math::GSL::Statisticsc::gsl_stats_char_variance_m;
171*gsl_stats_char_sd_m = *Math::GSL::Statisticsc::gsl_stats_char_sd_m;
172*gsl_stats_char_absdev_m = *Math::GSL::Statisticsc::gsl_stats_char_absdev_m;
173*gsl_stats_char_skew_m_sd = *Math::GSL::Statisticsc::gsl_stats_char_skew_m_sd;
174*gsl_stats_char_kurtosis_m_sd = *Math::GSL::Statisticsc::gsl_stats_char_kurtosis_m_sd;
175*gsl_stats_char_lag1_autocorrelation_m = *Math::GSL::Statisticsc::gsl_stats_char_lag1_autocorrelation_m;
176*gsl_stats_char_covariance_m = *Math::GSL::Statisticsc::gsl_stats_char_covariance_m;
177*gsl_stats_char_pvariance = *Math::GSL::Statisticsc::gsl_stats_char_pvariance;
178*gsl_stats_char_ttest = *Math::GSL::Statisticsc::gsl_stats_char_ttest;
179*gsl_stats_char_max = *Math::GSL::Statisticsc::gsl_stats_char_max;
180*gsl_stats_char_min = *Math::GSL::Statisticsc::gsl_stats_char_min;
181*gsl_stats_char_minmax = *Math::GSL::Statisticsc::gsl_stats_char_minmax;
182*gsl_stats_char_max_index = *Math::GSL::Statisticsc::gsl_stats_char_max_index;
183*gsl_stats_char_min_index = *Math::GSL::Statisticsc::gsl_stats_char_min_index;
184*gsl_stats_char_minmax_index = *Math::GSL::Statisticsc::gsl_stats_char_minmax_index;
185*gsl_stats_char_select = *Math::GSL::Statisticsc::gsl_stats_char_select;
186*gsl_stats_char_median_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_median_from_sorted_data;
187*gsl_stats_char_median = *Math::GSL::Statisticsc::gsl_stats_char_median;
188*gsl_stats_char_quantile_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_quantile_from_sorted_data;
189*gsl_stats_char_trmean_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_trmean_from_sorted_data;
190*gsl_stats_char_gastwirth_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_gastwirth_from_sorted_data;
191*gsl_stats_char_mad0 = *Math::GSL::Statisticsc::gsl_stats_char_mad0;
192*gsl_stats_char_mad = *Math::GSL::Statisticsc::gsl_stats_char_mad;
193*gsl_stats_char_Sn0_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_Sn0_from_sorted_data;
194*gsl_stats_char_Sn_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_Sn_from_sorted_data;
195*gsl_stats_char_Qn0_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_Qn0_from_sorted_data;
196*gsl_stats_char_Qn_from_sorted_data = *Math::GSL::Statisticsc::gsl_stats_char_Qn_from_sorted_data;
197
198# ------- VARIABLE STUBS --------
199
200package Math::GSL::Statistics;
201
202*GSL_VERSION = *Math::GSL::Statisticsc::GSL_VERSION;
203*GSL_MAJOR_VERSION = *Math::GSL::Statisticsc::GSL_MAJOR_VERSION;
204*GSL_MINOR_VERSION = *Math::GSL::Statisticsc::GSL_MINOR_VERSION;
205*GSL_POSZERO = *Math::GSL::Statisticsc::GSL_POSZERO;
206*GSL_NEGZERO = *Math::GSL::Statisticsc::GSL_NEGZERO;
207*GSL_SUCCESS = *Math::GSL::Statisticsc::GSL_SUCCESS;
208*GSL_FAILURE = *Math::GSL::Statisticsc::GSL_FAILURE;
209*GSL_CONTINUE = *Math::GSL::Statisticsc::GSL_CONTINUE;
210*GSL_EDOM = *Math::GSL::Statisticsc::GSL_EDOM;
211*GSL_ERANGE = *Math::GSL::Statisticsc::GSL_ERANGE;
212*GSL_EFAULT = *Math::GSL::Statisticsc::GSL_EFAULT;
213*GSL_EINVAL = *Math::GSL::Statisticsc::GSL_EINVAL;
214*GSL_EFAILED = *Math::GSL::Statisticsc::GSL_EFAILED;
215*GSL_EFACTOR = *Math::GSL::Statisticsc::GSL_EFACTOR;
216*GSL_ESANITY = *Math::GSL::Statisticsc::GSL_ESANITY;
217*GSL_ENOMEM = *Math::GSL::Statisticsc::GSL_ENOMEM;
218*GSL_EBADFUNC = *Math::GSL::Statisticsc::GSL_EBADFUNC;
219*GSL_ERUNAWAY = *Math::GSL::Statisticsc::GSL_ERUNAWAY;
220*GSL_EMAXITER = *Math::GSL::Statisticsc::GSL_EMAXITER;
221*GSL_EZERODIV = *Math::GSL::Statisticsc::GSL_EZERODIV;
222*GSL_EBADTOL = *Math::GSL::Statisticsc::GSL_EBADTOL;
223*GSL_ETOL = *Math::GSL::Statisticsc::GSL_ETOL;
224*GSL_EUNDRFLW = *Math::GSL::Statisticsc::GSL_EUNDRFLW;
225*GSL_EOVRFLW = *Math::GSL::Statisticsc::GSL_EOVRFLW;
226*GSL_ELOSS = *Math::GSL::Statisticsc::GSL_ELOSS;
227*GSL_EROUND = *Math::GSL::Statisticsc::GSL_EROUND;
228*GSL_EBADLEN = *Math::GSL::Statisticsc::GSL_EBADLEN;
229*GSL_ENOTSQR = *Math::GSL::Statisticsc::GSL_ENOTSQR;
230*GSL_ESING = *Math::GSL::Statisticsc::GSL_ESING;
231*GSL_EDIVERGE = *Math::GSL::Statisticsc::GSL_EDIVERGE;
232*GSL_EUNSUP = *Math::GSL::Statisticsc::GSL_EUNSUP;
233*GSL_EUNIMPL = *Math::GSL::Statisticsc::GSL_EUNIMPL;
234*GSL_ECACHE = *Math::GSL::Statisticsc::GSL_ECACHE;
235*GSL_ETABLE = *Math::GSL::Statisticsc::GSL_ETABLE;
236*GSL_ENOPROG = *Math::GSL::Statisticsc::GSL_ENOPROG;
237*GSL_ENOPROGJ = *Math::GSL::Statisticsc::GSL_ENOPROGJ;
238*GSL_ETOLF = *Math::GSL::Statisticsc::GSL_ETOLF;
239*GSL_ETOLX = *Math::GSL::Statisticsc::GSL_ETOLX;
240*GSL_ETOLG = *Math::GSL::Statisticsc::GSL_ETOLG;
241*GSL_EOF = *Math::GSL::Statisticsc::GSL_EOF;
242
243@EXPORT_OK = qw/
244               gsl_stats_mean
245               gsl_stats_variance
246               gsl_stats_sd
247               gsl_stats_variance_with_fixed_mean
248               gsl_stats_sd_with_fixed_mean
249               gsl_stats_tss
250               gsl_stats_tss_m
251               gsl_stats_absdev
252               gsl_stats_skew
253               gsl_stats_kurtosis
254               gsl_stats_lag1_autocorrelation
255               gsl_stats_covariance
256               gsl_stats_correlation
257               gsl_stats_variance_m
258               gsl_stats_sd_m
259               gsl_stats_absdev_m
260               gsl_stats_skew_m_sd
261               gsl_stats_kurtosis_m_sd
262               gsl_stats_lag1_autocorrelation_m
263               gsl_stats_covariance_m
264               gsl_stats_wmean
265               gsl_stats_wvariance
266               gsl_stats_wsd
267               gsl_stats_wvariance_with_fixed_mean
268               gsl_stats_wsd_with_fixed_mean
269               gsl_stats_wtss
270               gsl_stats_wtss_m
271               gsl_stats_wabsdev
272               gsl_stats_wskew
273               gsl_stats_wkurtosis
274               gsl_stats_wvariance_m
275               gsl_stats_wsd_m
276               gsl_stats_wabsdev_m
277               gsl_stats_wskew_m_sd
278               gsl_stats_wkurtosis_m_sd
279               gsl_stats_pvariance
280               gsl_stats_ttest
281               gsl_stats_max
282               gsl_stats_min
283               gsl_stats_minmax
284               gsl_stats_max_index
285               gsl_stats_min_index
286               gsl_stats_minmax_index
287               gsl_stats_median_from_sorted_data
288               gsl_stats_quantile_from_sorted_data
289               /;
290our @EXPORT_int = qw/
291               gsl_stats_int_mean
292               gsl_stats_int_variance
293               gsl_stats_int_sd
294               gsl_stats_int_variance_with_fixed_mean
295               gsl_stats_int_sd_with_fixed_mean
296               gsl_stats_int_tss
297               gsl_stats_int_tss_m
298               gsl_stats_int_absdev
299               gsl_stats_int_skew
300               gsl_stats_int_kurtosis
301               gsl_stats_int_lag1_autocorrelation
302               gsl_stats_int_covariance
303               gsl_stats_int_correlation
304               gsl_stats_int_variance_m
305               gsl_stats_int_sd_m
306               gsl_stats_int_absdev_m
307               gsl_stats_int_skew_m_sd
308               gsl_stats_int_kurtosis_m_sd
309               gsl_stats_int_lag1_autocorrelation_m
310               gsl_stats_int_covariance_m
311               gsl_stats_int_pvariance
312               gsl_stats_int_ttest
313               gsl_stats_int_max
314               gsl_stats_int_min
315               gsl_stats_int_minmax
316               gsl_stats_int_max_index
317               gsl_stats_int_min_index
318               gsl_stats_int_minmax_index
319               gsl_stats_int_median_from_sorted_data
320               gsl_stats_int_quantile_from_sorted_data
321               /;
322our @EXPORT_char = qw/
323               gsl_stats_char_mean
324               gsl_stats_char_variance
325               gsl_stats_char_sd
326               gsl_stats_char_variance_with_fixed_mean
327               gsl_stats_char_sd_with_fixed_mean
328               gsl_stats_char_tss
329               gsl_stats_char_tss_m
330               gsl_stats_char_absdev
331               gsl_stats_char_skew
332               gsl_stats_char_kurtosis
333               gsl_stats_char_lag1_autocorrelation
334               gsl_stats_char_covariance
335               gsl_stats_char_correlation
336               gsl_stats_char_variance_m
337               gsl_stats_char_sd_m
338               gsl_stats_char_absdev_m
339               gsl_stats_char_skew_m_sd
340               gsl_stats_char_kurtosis_m_sd
341               gsl_stats_char_lag1_autocorrelation_m
342               gsl_stats_char_covariance_m
343               gsl_stats_char_pvariance
344               gsl_stats_char_ttest
345               gsl_stats_char_max
346               gsl_stats_char_min
347               gsl_stats_char_minmax
348               gsl_stats_char_max_index
349               gsl_stats_char_min_index
350               gsl_stats_char_minmax_index
351               gsl_stats_char_median_from_sorted_data
352               gsl_stats_char_quantile_from_sorted_data
353             /;
354push @EXPORT_OK, @EXPORT_int, @EXPORT_char;
355%EXPORT_TAGS = (
356                all => \@EXPORT_OK,
357                int => \@EXPORT_int,
358                char => \@EXPORT_char
359               );
360__END__
361
362=encoding utf8
363
364=head1 NAME
365
366Math::GSL::Statistics - Statistical functions
367
368=head1 SYNOPSIS
369
370    use Math::GSL::Statistics qw /:all/;
371
372    my $data     = [17.2, 18.1, 16.5, 18.3, 12.6];
373    my $mean     = gsl_stats_mean($data, 1, 5);
374    my $variance = gsl_stats_variance($data, 1, 5);
375    my $largest  = gsl_stats_max($data, 1, 5);
376    my $smallest = gsl_stats_min($data, 1, 5);
377    print qq{
378    Dataset : @$data
379    Sample mean           $mean
380    Estimated variance    $variance
381    Largest value         $largest
382    Smallest value        $smallest
383    };
384
385
386=head1 DESCRIPTION
387
388Here is a list of all the functions in this module :
389
390=over 2
391
392=item * C<gsl_stats_mean($data, $stride, $n)> - This function returns the arithmetic mean of the array reference $data, a dataset of length $n with stride $stride. The arithmetic mean, or sample mean, is denoted by \Hat\mu and defined as, \Hat\mu = (1/N) \sum x_i where x_i are the elements of the dataset $data. For samples drawn from a gaussian distribution the variance of \Hat\mu is \sigma^2 / N.
393
394=item * C<gsl_stats_variance($data, $stride, $n)> - This function returns the estimated, or sample, variance of data, an array reference of length $n with stride $stride. The estimated variance is denoted by \Hat\sigma^2 and is defined by, \Hat\sigma^2 = (1/(N-1)) \sum (x_i - \Hat\mu)^2 where x_i are the elements of the dataset data. Note that the normalization factor of 1/(N-1) results from the derivation of \Hat\sigma^2 as an unbiased estimator of the population variance \sigma^2. For samples drawn from a gaussian distribution the variance of \Hat\sigma^2 itself is 2 \sigma^4 / N. This function computes the mean via a call to gsl_stats_mean. If you have already computed the mean then you can pass it directly to gsl_stats_variance_m.
395
396=item * C<gsl_stats_sd($data, $stride, $n)>
397
398=item * C<gsl_stats_sd_m($data, $stride, $n, $mean)>
399
400The standard deviation is defined as the square root of the variance. These functions return the square root of the corresponding variance functions above.
401
402=item * C<gsl_stats_variance_with_fixed_mean($data, $stride, $n, $mean)> - This function calculates the standard deviation of the array reference $data for a fixed population mean $mean. The result is the square root of the corresponding variance function.
403
404=item * C<gsl_stats_sd_with_fixed_mean($data, $stride, $n, $mean)> - This function computes an unbiased estimate of the variance of data when the population mean $mean of the underlying distribution is known a priori. In this case the estimator for the variance uses the factor 1/N and the sample mean \Hat\mu is replaced by the known population mean \mu, \Hat\sigma^2 = (1/N) \sum (x_i - \mu)^2
405
406=item * C<gsl_stats_tss($data, $stride, $n)>
407
408=item * C<gsl_stats_tss_m($data, $stride, $n, $mean)>
409
410These functions return the total sum of squares (TSS) of data about the mean. For gsl_stats_tss_m the user-supplied value of mean is used, and for gsl_stats_tss it is computed using gsl_stats_mean. TSS =  \sum (x_i - mean)^2
411
412=item * C<gsl_stats_absdev($data, $stride, $n)> - This function computes the absolute deviation from the mean of data, a dataset of length $n with stride $stride. The absolute deviation from the mean is defined as, absdev  = (1/N) \sum |x_i - \Hat\mu| where x_i are the elements of the array reference $data. The absolute deviation from the mean provides a more robust measure of the width of a distribution than the variance. This function computes the mean of data via a call to gsl_stats_mean.
413
414=item * C<gsl_stats_skew($data, $stride, $n)> - This function computes the skewness of $data, a dataset in the form of an array reference of length $n with stride $stride. The skewness is defined as, skew = (1/N) \sum ((x_i - \Hat\mu)/\Hat\sigma)^3 where x_i are the elements of the dataset $data. The skewness measures the asymmetry of the tails of a distribution. The function computes the mean and estimated standard deviation of data via calls to gsl_stats_mean and gsl_stats_sd.
415
416=item * C<gsl_stats_skew_m_sd($data, $stride, $n, $mean, $sd)> - This function computes the skewness of the array reference $data using the given values of the mean $mean and standard deviation $sd, skew = (1/N) \sum ((x_i - mean)/sd)^3. These functions are useful if you have already computed the mean and standard deviation of $data and want to avoid recomputing them.
417
418=item * C<gsl_stats_kurtosis($data, $stride, $n)> - This function computes the kurtosis of data, an array reference of length $n with stride $stride. The kurtosis is defined as, kurtosis = ((1/N) \sum ((x_i - \Hat\mu)/\Hat\sigma)^4)  - 3. The kurtosis measures how sharply peaked a distribution is, relative to its width. The kurtosis is normalized to zero for a gaussian distribution.
419
420=item * C<gsl_stats_kurtosis_m_sd($data, $stride, $n, $mean, $sd)> - This function computes the kurtosis of the array reference $data using the given values of the mean $mean and standard deviation $sd, kurtosis = ((1/N) \sum ((x_i - mean)/sd)^4) - 3. This function is useful if you have already computed the mean and standard deviation of data and want to avoid recomputing them.
421
422=item * C<gsl_stats_lag1_autocorrelation($data, $stride, $n)> - This function computes the lag-1 autocorrelation of the array reference data.
423 a_1 = {\sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i-1} - \Hat\mu)
424  \over
425 \sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i} - \Hat\mu)}
426
427=item * C<gsl_stats_lag1_autocorrelation_m($data, $stride, $n, $mean)> - This function computes the lag-1 autocorrelation of the array reference $data using the given value of the mean $mean.
428
429=item * C<gsl_stats_covariance($data1, $stride1, $data2, $stride2, $n)> - This function computes the covariance of the array reference $data1 and $data2 which must both be of the same length $n. covar = (1/(n - 1)) \sum_{i = 1}^{n} (x_i - \Hat x) (y_i - \Hat y)
430
431=item * C<gsl_stats_covariance_m($data1, $stride1, $data2, $stride2, $n, $mean1, $mean2)> - This function computes the covariance of the array reference $data1 and $data2 using the given values of the means, $mean1 and $mean2. This is useful if you have already computed the means of $data1 and $data2 and want to avoid recomputing them.
432
433=item * C<gsl_stats_correlation($data1, $stride1, $data2, $stride2, $n)> - This function efficiently computes the Pearson correlation coefficient between the array reference $data1 and $data2 which must both be of the same length $n.
434 r = cov(x, y) / (\Hat\sigma_x \Hat\sigma_y)
435   = {1/(n-1) \sum (x_i - \Hat x) (y_i - \Hat y)
436      \over
437      \sqrt{1/(n-1) \sum (x_i - \Hat x)^2} \sqrt{1/(n-1) \sum (y_i - \Hat y)^2}
438     }
439
440=item * C<gsl_stats_variance_m($data, $stride, $n, $mean)> - This function returns the sample variance of $data, an array reference, relative to the given value of $mean. The function is computed with \Hat\mu replaced by the value of mean that you supply, \Hat\sigma^2 = (1/(N-1)) \sum (x_i - mean)^2
441
442=item * C<gsl_stats_absdev_m($data, $stride, $n, $mean)> - This function computes the absolute deviation of the dataset $data, an array refrence, relative to the given value of $mean, absdev  = (1/N) \sum |x_i - mean|. This function is useful if you have already computed the mean of data (and want to avoid recomputing it), or wish to calculate the absolute deviation relative to another value (such as zero, or the median).
443
444=item * C<gsl_stats_wmean($w, $wstride, $data, $stride, $n)> - This function returns the weighted mean of the dataset $data array reference with stride $stride and length $n, using the set of weights $w, which is an array reference, with stride $wstride and length $n. The weighted mean is defined as, \Hat\mu = (\sum w_i x_i) / (\sum w_i)
445
446=item * C<gsl_stats_wvariance($w, $wstride, $data, $stride, $n)> - This function returns the estimated variance of the dataset $data, which is the dataset, with stride $stride and length $n, using the set of weights $w (as an array reference) with stride $wstride and length $n. The estimated variance of a weighted dataset is defined as,  \Hat\sigma^2 = ((\sum w_i)/((\sum w_i)^2 - \sum (w_i^2))) \sum w_i (x_i - \Hat\mu)^2. Note that this expression reduces to an unweighted variance with the familiar 1/(N-1) factor when there are N equal non-zero weights.
447
448=item * C<gsl_stats_wvariance_m($w, $wstride, $data, $stride, $n, $wmean, $wsd)> - This function returns the estimated variance of the weighted dataset $data (which is an array reference) using the given weighted mean $wmean.
449
450=item * C<gsl_stats_wsd($w, $wstride, $data, $stride, $n)> - The standard deviation is defined as the square root of the variance. This function returns the square root of the corresponding variance function gsl_stats_wvariance above.
451
452=item * C<gsl_stats_wsd_m($w, $wstride, $data, $stride, $n, $wmean)> - This function returns the square root of the corresponding variance function gsl_stats_wvariance_m above.
453
454=item * C<gsl_stats_wvariance_with_fixed_mean($w, $wstride, $data, $stride, $n, $mean)> - This function computes an unbiased estimate of the variance of weighted dataset $data (which is an array reference) when the population mean $mean of the underlying distribution is known a priori. In this case the estimator for the variance replaces the sample mean \Hat\mu by the known population mean \mu, \Hat\sigma^2 = (\sum w_i (x_i - \mu)^2) / (\sum w_i)
455
456=item * C<gsl_stats_wsd_with_fixed_mean($w, $wstride, $data, $stride, $n, $mean)> - The standard deviation is defined as the square root of the variance. This function returns the square root of the corresponding variance function above.
457
458=item * C<gsl_stats_wtss($w, $wstride, $data, $stride, $n)>
459
460=item * C<gsl_stats_wtss_m($w, $wstride, $data, $stride, $n, $wmean)> - These functions return the weighted total sum of squares (TSS) of data about the weighted mean. For gsl_stats_wtss_m the user-supplied value of $wmean is used, and for gsl_stats_wtss it is computed using gsl_stats_wmean. TSS =  \sum w_i (x_i - wmean)^2
461
462=item * C<gsl_stats_wabsdev($w, $wstride, $data, $stride, $n)> - This function computes the weighted absolute deviation from the weighted mean of $data, which is an array reference. The absolute deviation from the mean is defined as, absdev = (\sum w_i |x_i - \Hat\mu|) / (\sum w_i)
463
464=item * C<gsl_stats_wabsdev_m($w, $wstride, $data, $stride, $n, $wmean)> - This function computes the absolute deviation of the weighted dataset $data (an array reference) about the given weighted mean $wmean.
465
466=item * C<gsl_stats_wskew($w, $wstride, $data, $stride, $n)> - This function computes the weighted skewness of the dataset $data, an array reference. skew = (\sum w_i ((x_i - xbar)/\sigma)^3) / (\sum w_i)
467
468=item * C<gsl_stats_wskew_m_sd($w, $wstride, $data, $stride, $n, $wmean, $wsd)> - This function computes the weighted skewness of the dataset $data using the given values of the weighted mean and weighted standard deviation, $wmean and $wsd.
469
470=item * C<gsl_stats_wkurtosis($w, $wstride, $data, $stride, $n)> - This function computes the weighted kurtosis of the dataset $data, an array reference. kurtosis = ((\sum w_i ((x_i - xbar)/sigma)^4) / (\sum w_i)) - 3
471
472=item * C<gsl_stats_wkurtosis_m_sd($w, $wstride, $data, $stride, $n, $wmean, $wsd)> - This function computes the weighted kurtosis of the dataset $data, an array reference, using the given values of the weighted mean and weighted standard deviation, $wmean and $wsd.
473
474=item * C<gsl_stats_pvariance($data, $stride, $n, $data2, $stride2, $n2)>
475
476=item * C<gsl_stats_ttest($data1, $stride1, $n1, $data2, $stride2, $n2)>
477
478=item * C<gsl_stats_max($data, $stride, $n)> - This function returns the maximum value in the $data array reference, a dataset of length $n with stride $stride. The maximum value is defined as the value of the element x_i which satisfies x_i >= x_j for all j. If you want instead to find the element with the largest absolute magnitude you will need to apply fabs or abs to your data before calling this function.
479
480=item * C<gsl_stats_min($data, $stride, $n)> - This function returns the minimum value in $data (which is an array reference) a dataset of length $n with stride $stride. The minimum value is defined as the value of the element x_i which satisfies x_i <= x_j for all j. If you want instead to find the element with the smallest absolute magnitude you will need to apply fabs or abs to your data before calling this function.
481
482=item * C<gsl_stats_minmax($data, $stride, $n)> - This function finds both the minimum and maximum values in $data, which is an array reference, in a single pass and returns them in this order.
483
484=item * C<gsl_stats_max_index($data, $stride, $n)> - This function returns the index of the maximum value in $data array reference, a dataset of length $n with stride $stride. The maximum value is defined as the value of the element x_i which satisfies x_i >= x_j for all j. When there are several equal maximum elements then the first one is chosen.
485
486=item * C<gsl_stats_min_index($data, $stride, $n)> - This function returns the index of the minimum value in $data array reference, a dataset of length $n with stride $stride. The minimum value is defined as the value of the element x_i which satisfies x_i <= x_j for all j. When there are several equal minimum elements then the first one is chosen.
487
488=item * C<gsl_stats_minmax_index($data, $stride, $n)> - This function returns the indexes of the minimum and maximum values in $data, an array reference in a single pass. The value are returned in this order.
489
490=item * C<gsl_stats_median_from_sorted_data($sorted_data, $stride, $n)> - This function returns the median value of $sorted_data (which is an array reference), a dataset of length $n with stride $stride. The elements of the array must be in ascending numerical order. There are no checks to see whether the data are sorted, so the function gsl_sort should always be used first. This function can be found in the Math::GSL::Sort module.  When the dataset has an odd number of elements the median is the value of element (n-1)/2. When the dataset has an even number of elements the median is the mean of the two nearest middle values, elements (n-1)/2 and n/2. Since the algorithm for computing the median involves interpolation this function always returns a floating-point number, even for integer data types.
491
492=item * C<gsl_stats_quantile_from_sorted_data($sorted_data, $stride, $n, $f)> - This function returns a quantile value of $sorted_data, a double-precision array reference of length $n with stride $stride. The elements of the array must be in ascending numerical order. The quantile is determined by the f, a fraction between 0 and 1. For example, to compute the value of the 75th percentile f should have the value 0.75. There are no checks to see whether the data are sorted, so the function gsl_sort should always be used first. This function can be found in the Math::GSL::Sort module. The quantile is found by interpolation, using the formula quantile = (1 - \delta) x_i + \delta x_{i+1} where i is floor((n - 1)f) and \delta is (n-1)f - i. Thus the minimum value of the array (data[0*stride]) is given by f equal to zero, the maximum value (data[(n-1)*stride]) is given by f equal to one and the median value is given by f equal to 0.5. Since the algorithm for computing quantiles involves interpolation this function always returns a floating-point number, even for integer data types.
493
494=back
495
496The following function are simply variants for int and char of the last functions:
497
498=over 4
499
500=item * C<gsl_stats_int_mean >
501
502=item * C<gsl_stats_int_variance >
503
504=item * C<gsl_stats_int_sd >
505
506=item * C<gsl_stats_int_variance_with_fixed_mean >
507
508=item * C<gsl_stats_int_sd_with_fixed_mean >
509
510=item * C<gsl_stats_int_tss >
511
512=item * C<gsl_stats_int_tss_m >
513
514=item * C<gsl_stats_int_absdev >
515
516=item * C<gsl_stats_int_skew >
517
518=item * C<gsl_stats_int_kurtosis >
519
520=item * C<gsl_stats_int_lag1_autocorrelation >
521
522=item * C<gsl_stats_int_covariance >
523
524=item * C<gsl_stats_int_correlation >
525
526=item * C<gsl_stats_int_variance_m >
527
528=item * C<gsl_stats_int_sd_m >
529
530=item * C<gsl_stats_int_absdev_m >
531
532=item * C<gsl_stats_int_skew_m_sd >
533
534=item * C<gsl_stats_int_kurtosis_m_sd >
535
536=item * C<gsl_stats_int_lag1_autocorrelation_m >
537
538=item * C<gsl_stats_int_covariance_m >
539
540=item * C<gsl_stats_int_pvariance >
541
542=item * C<gsl_stats_int_ttest >
543
544=item * C<gsl_stats_int_max >
545
546=item * C<gsl_stats_int_min >
547
548=item * C<gsl_stats_int_minmax >
549
550=item * C<gsl_stats_int_max_index >
551
552=item * C<gsl_stats_int_min_index >
553
554=item * C<gsl_stats_int_minmax_index >
555
556=item * C<gsl_stats_int_median_from_sorted_data >
557
558=item * C<gsl_stats_int_quantile_from_sorted_data >
559
560=item * C<gsl_stats_char_mean >
561
562=item * C<gsl_stats_char_variance >
563
564=item * C<gsl_stats_char_sd >
565
566=item * C<gsl_stats_char_variance_with_fixed_mean >
567
568=item * C<gsl_stats_char_sd_with_fixed_mean >
569
570=item * C<gsl_stats_char_tss >
571
572=item * C<gsl_stats_char_tss_m >
573
574=item * C<gsl_stats_char_absdev >
575
576=item * C<gsl_stats_char_skew >
577
578=item * C<gsl_stats_char_kurtosis >
579
580=item * C<gsl_stats_char_lag1_autocorrelation >
581
582=item * C<gsl_stats_char_covariance >
583
584=item * C<gsl_stats_char_correlation >
585
586=item * C<gsl_stats_char_variance_m >
587
588=item * C<gsl_stats_char_sd_m >
589
590=item * C<gsl_stats_char_absdev_m >
591
592=item * C<gsl_stats_char_skew_m_sd >
593
594=item * C<gsl_stats_char_kurtosis_m_sd >
595
596=item * C<gsl_stats_char_lag1_autocorrelation_m >
597
598=item * C<gsl_stats_char_covariance_m >
599
600=item * C<gsl_stats_char_pvariance >
601
602=item * C<gsl_stats_char_ttest >
603
604=item * C<gsl_stats_char_max >
605
606=item * C<gsl_stats_char_min >
607
608=item * C<gsl_stats_char_minmax >
609
610=item * C<gsl_stats_char_max_index >
611
612=item * C<gsl_stats_char_min_index >
613
614=item * C<gsl_stats_char_minmax_index >
615
616=item * C<gsl_stats_char_median_from_sorted_data >
617
618=item * C<gsl_stats_char_quantile_from_sorted_data >
619
620=back
621
622You have to add the functions you want to use inside the qw /put_function_here /.
623You can also write use Math::GSL::Statistics qw/:all/; to use all available functions of the module.
624Other tags are also available, here is a complete list of all tags for this module :
625
626=over
627
628=item all
629
630=item int
631
632=item char
633
634=back
635
636For more informations on the functions, we refer you to the GSL official
637documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
638
639
640
641
642=head1 AUTHORS
643
644Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
645
646=head1 COPYRIGHT AND LICENSE
647
648Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan
649
650This program is free software; you can redistribute it and/or modify it
651under the same terms as Perl itself.
652
653=cut
654
655
6561;
657