| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
#line 453 "lib/PDL/PP.pm" |
|
3
|
|
|
|
|
|
|
/* |
|
4
|
|
|
|
|
|
|
* THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/Stats/TS.pd! Do not modify! |
|
5
|
|
|
|
|
|
|
*/ |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \ |
|
8
|
|
|
|
|
|
|
if (destroy) { \ |
|
9
|
|
|
|
|
|
|
comp_free_code \ |
|
10
|
|
|
|
|
|
|
} \ |
|
11
|
|
|
|
|
|
|
if ((trans)->dims_redone) { \ |
|
12
|
|
|
|
|
|
|
ntpriv_free_code \ |
|
13
|
|
|
|
|
|
|
} |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#include "EXTERN.h" |
|
16
|
|
|
|
|
|
|
#include "perl.h" |
|
17
|
|
|
|
|
|
|
#include "XSUB.h" |
|
18
|
|
|
|
|
|
|
#include "pdl.h" |
|
19
|
|
|
|
|
|
|
#include "pdlcore.h" |
|
20
|
|
|
|
|
|
|
#define PDL PDL_Stats_TS |
|
21
|
|
|
|
|
|
|
extern Core* PDL; /* Structure hold core C functions */ |
|
22
|
|
|
|
|
|
|
#line 23 "lib/PDL/Stats/TS.xs" |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#include |
|
25
|
|
|
|
|
|
|
#define Z10 1.64485362695147 |
|
26
|
|
|
|
|
|
|
#define Z05 1.95996398454005 |
|
27
|
|
|
|
|
|
|
#define Z01 2.5758293035489 |
|
28
|
|
|
|
|
|
|
#define Z001 3.29052673149193 |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
pdl_error pdl_run_acf(pdl *x,pdl *r,IV lag); |
|
31
|
|
|
|
|
|
|
pdl_error pdl_run_acvf(pdl *x,pdl *v,IV lag); |
|
32
|
|
|
|
|
|
|
pdl_error pdl_run_dseason(pdl *x,pdl *d,pdl *xd); |
|
33
|
|
|
|
|
|
|
pdl_error pdl_run_fill_ma(pdl *x,pdl *q,pdl *xf); |
|
34
|
|
|
|
|
|
|
pdl_error pdl_run_filter_exp(pdl *x,pdl *a,pdl *xf); |
|
35
|
|
|
|
|
|
|
pdl_error pdl_run_filter_ma(pdl *x,pdl *q,pdl *xf); |
|
36
|
|
|
|
|
|
|
pdl_error pdl_run_mae(pdl *a,pdl *b,pdl *c); |
|
37
|
|
|
|
|
|
|
pdl_error pdl_run_mape(pdl *a,pdl *b,pdl *c); |
|
38
|
|
|
|
|
|
|
pdl_error pdl_run_wmape(pdl *a,pdl *b,pdl *c); |
|
39
|
|
|
|
|
|
|
pdl_error pdl_run_portmanteau(pdl *r,pdl *t,pdl *Q); |
|
40
|
|
|
|
|
|
|
pdl_error pdl_run_pred_ar(pdl *x,pdl *b,pdl *pred,IV end); |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#line 449 "lib/PDL/PP.pm" |
|
43
|
|
|
|
|
|
|
#include "pdlperl.h" |
|
44
|
|
|
|
|
|
|
#line 45 "lib/PDL/Stats/TS.xs" |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Core* PDL = NULL; /* Structure hold core C functions */ |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
MODULE = PDL::Stats::TS PACKAGE = PDL PREFIX=pdl_run_ |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
void |
|
54
|
|
|
|
|
|
|
_acf_int(x,r,lag) |
|
55
|
|
|
|
|
|
|
pdl *x |
|
56
|
|
|
|
|
|
|
pdl *r |
|
57
|
|
|
|
|
|
|
IV lag |
|
58
|
|
|
|
|
|
|
CODE: |
|
59
|
2
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_acf(x,r,lag)); |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
void |
|
62
|
|
|
|
|
|
|
_acvf_int(x,v,lag) |
|
63
|
|
|
|
|
|
|
pdl *x |
|
64
|
|
|
|
|
|
|
pdl *v |
|
65
|
|
|
|
|
|
|
IV lag |
|
66
|
|
|
|
|
|
|
CODE: |
|
67
|
1
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_acvf(x,v,lag)); |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
void |
|
70
|
|
|
|
|
|
|
pdl_run_dseason(x, d, xd=PDL_XS_PERLINIT_initsv(xd_SV)) |
|
71
|
|
|
|
|
|
|
SV *xd_SV = items > 2 ? ST(2) : NULL; |
|
72
|
|
|
|
|
|
|
PREINIT: |
|
73
|
4
|
50
|
|
|
|
|
PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
INPUT: |
|
75
|
|
|
|
|
|
|
pdl *x |
|
76
|
|
|
|
|
|
|
pdl *d |
|
77
|
|
|
|
|
|
|
pdl *xd |
|
78
|
|
|
|
|
|
|
PPCODE: |
|
79
|
4
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_dseason(x,d,xd)); |
|
80
|
4
|
50
|
|
|
|
|
PDL_XS_RETURN(ST(0) = xd_SV) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
void |
|
83
|
|
|
|
|
|
|
_fill_ma_int(x,q,xf) |
|
84
|
|
|
|
|
|
|
pdl *x |
|
85
|
|
|
|
|
|
|
pdl *q |
|
86
|
|
|
|
|
|
|
pdl *xf |
|
87
|
|
|
|
|
|
|
CODE: |
|
88
|
1
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_fill_ma(x,q,xf)); |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
void |
|
91
|
|
|
|
|
|
|
pdl_run_filter_exp(x, a, xf=PDL_XS_PERLINIT_initsv(xf_SV)) |
|
92
|
|
|
|
|
|
|
SV *xf_SV = items > 2 ? ST(2) : NULL; |
|
93
|
|
|
|
|
|
|
PREINIT: |
|
94
|
1
|
50
|
|
|
|
|
PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
INPUT: |
|
96
|
|
|
|
|
|
|
pdl *x |
|
97
|
|
|
|
|
|
|
pdl *a |
|
98
|
|
|
|
|
|
|
pdl *xf |
|
99
|
|
|
|
|
|
|
PPCODE: |
|
100
|
1
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_filter_exp(x,a,xf)); |
|
101
|
1
|
50
|
|
|
|
|
PDL_XS_RETURN(ST(0) = xf_SV) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
void |
|
104
|
|
|
|
|
|
|
pdl_run_filter_ma(x, q, xf=PDL_XS_PERLINIT_initsv(xf_SV)) |
|
105
|
|
|
|
|
|
|
SV *xf_SV = items > 2 ? ST(2) : NULL; |
|
106
|
|
|
|
|
|
|
PREINIT: |
|
107
|
1
|
50
|
|
|
|
|
PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
INPUT: |
|
109
|
|
|
|
|
|
|
pdl *x |
|
110
|
|
|
|
|
|
|
pdl *q |
|
111
|
|
|
|
|
|
|
pdl *xf |
|
112
|
|
|
|
|
|
|
PPCODE: |
|
113
|
1
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_filter_ma(x,q,xf)); |
|
114
|
1
|
50
|
|
|
|
|
PDL_XS_RETURN(ST(0) = xf_SV) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
void |
|
117
|
|
|
|
|
|
|
pdl_run_mae(a, b, c=PDL_XS_PERLINIT_initsv(c_SV)) |
|
118
|
|
|
|
|
|
|
SV *c_SV = items > 2 ? ST(2) : NULL; |
|
119
|
|
|
|
|
|
|
PREINIT: |
|
120
|
2
|
50
|
|
|
|
|
PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
INPUT: |
|
122
|
|
|
|
|
|
|
pdl *a |
|
123
|
|
|
|
|
|
|
pdl *b |
|
124
|
|
|
|
|
|
|
pdl *c |
|
125
|
|
|
|
|
|
|
PPCODE: |
|
126
|
2
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_mae(a,b,c)); |
|
127
|
2
|
50
|
|
|
|
|
PDL_XS_RETURN(ST(0) = c_SV) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
void |
|
130
|
|
|
|
|
|
|
pdl_run_mape(a, b, c=PDL_XS_PERLINIT_initsv(c_SV)) |
|
131
|
|
|
|
|
|
|
SV *c_SV = items > 2 ? ST(2) : NULL; |
|
132
|
|
|
|
|
|
|
PREINIT: |
|
133
|
2
|
50
|
|
|
|
|
PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
INPUT: |
|
135
|
|
|
|
|
|
|
pdl *a |
|
136
|
|
|
|
|
|
|
pdl *b |
|
137
|
|
|
|
|
|
|
pdl *c |
|
138
|
|
|
|
|
|
|
PPCODE: |
|
139
|
2
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_mape(a,b,c)); |
|
140
|
2
|
50
|
|
|
|
|
PDL_XS_RETURN(ST(0) = c_SV) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
void |
|
143
|
|
|
|
|
|
|
pdl_run_wmape(a, b, c=PDL_XS_PERLINIT_initsv(c_SV)) |
|
144
|
|
|
|
|
|
|
SV *c_SV = items > 2 ? ST(2) : NULL; |
|
145
|
|
|
|
|
|
|
PREINIT: |
|
146
|
2
|
50
|
|
|
|
|
PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
INPUT: |
|
148
|
|
|
|
|
|
|
pdl *a |
|
149
|
|
|
|
|
|
|
pdl *b |
|
150
|
|
|
|
|
|
|
pdl *c |
|
151
|
|
|
|
|
|
|
PPCODE: |
|
152
|
2
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_wmape(a,b,c)); |
|
153
|
2
|
50
|
|
|
|
|
PDL_XS_RETURN(ST(0) = c_SV) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
void |
|
156
|
|
|
|
|
|
|
pdl_run_portmanteau(r, t, Q=PDL_XS_PERLINIT_initsv(Q_SV)) |
|
157
|
|
|
|
|
|
|
SV *Q_SV = items > 2 ? ST(2) : NULL; |
|
158
|
|
|
|
|
|
|
PREINIT: |
|
159
|
1
|
50
|
|
|
|
|
PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
INPUT: |
|
161
|
|
|
|
|
|
|
pdl *r |
|
162
|
|
|
|
|
|
|
pdl *t |
|
163
|
|
|
|
|
|
|
pdl *Q |
|
164
|
|
|
|
|
|
|
PPCODE: |
|
165
|
1
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_portmanteau(r,t,Q)); |
|
166
|
1
|
50
|
|
|
|
|
PDL_XS_RETURN(ST(0) = Q_SV) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
void |
|
169
|
|
|
|
|
|
|
_pred_ar_int(x,b,pred,end) |
|
170
|
|
|
|
|
|
|
pdl *x |
|
171
|
|
|
|
|
|
|
pdl *b |
|
172
|
|
|
|
|
|
|
pdl *pred |
|
173
|
|
|
|
|
|
|
IV end |
|
174
|
|
|
|
|
|
|
CODE: |
|
175
|
2
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_pred_ar(x,b,pred,end)); |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
#line 483 "lib/PDL/PP.pm" |
|
179
|
|
|
|
|
|
|
BOOT: |
|
180
|
|
|
|
|
|
|
/* Get pointer to structure of core shared C routines */ |
|
181
|
|
|
|
|
|
|
/* make sure PDL::Core is loaded */ |
|
182
|
|
|
|
|
|
|
#line 183 "lib/PDL/Stats/TS.xs" |
|
183
|
1
|
|
|
|
|
|
perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */ |
|
184
|
|
|
|
|
|
|
#ifndef aTHX_ |
|
185
|
|
|
|
|
|
|
#define aTHX_ |
|
186
|
|
|
|
|
|
|
#endif |
|
187
|
1
|
50
|
|
|
|
|
if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
188
|
1
|
|
|
|
|
|
SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */ |
|
189
|
1
|
50
|
|
|
|
|
if (!CoreSV) |
|
190
|
0
|
|
|
|
|
|
Perl_croak(aTHX_ "We require the PDL::Core module, which was not found"); |
|
191
|
1
|
50
|
|
|
|
|
if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ |
|
192
|
0
|
|
|
|
|
|
Perl_croak(aTHX_ "Got NULL pointer for PDL"); |
|
193
|
1
|
50
|
|
|
|
|
if (PDL->Version != PDL_CORE_VERSION) |
|
194
|
0
|
|
|
|
|
|
Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::Stats::TS needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION); |