File Coverage

lib/PDL/Stats/TS-pp-dseason.c
Criterion Covered Total %
statement 83 142 58.4
branch 125 372 33.6
condition n/a
subroutine n/a
pod n/a
total 208 514 40.4


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-pp-dseason.c"
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              
31             #line 1857 "lib/PDL/PP.pm"
32             pdl_error pdl_dseason_readdata(pdl_trans *__privtrans) {
33             pdl_error PDL_err = {0, NULL, 0};
34             #line 35 "lib/PDL/Stats/TS-pp-dseason.c"
35 4           register PDL_Indx __t_size = __privtrans->ind_sizes[0];
36 4 50         if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in dseason:" "broadcast.incs NULL");
37             /* broadcastloop declarations */
38             int __brcloopval;
39             register PDL_Indx __tind0,__tind1; /* counters along dim */
40 4           register PDL_Indx __tnpdls = __privtrans->broadcast.npdls;
41             /* dims here are how many steps along those dims */
42 4           register PDL_Indx __tinc0_x = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0);
43 4           register PDL_Indx __tinc0_d = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0);
44 4           register PDL_Indx __tinc0_xd = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,0);
45 4           register PDL_Indx __tinc1_x = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1);
46 4           register PDL_Indx __tinc1_d = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1);
47 4           register PDL_Indx __tinc1_xd = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,1);
48             #define PDL_BROADCASTLOOP_START_dseason_readdata PDL_BROADCASTLOOP_START( \
49             readdata, \
50             __privtrans->broadcast, \
51             __privtrans->vtable, \
52             x_datap += __offsp[0]; \
53             d_datap += __offsp[1]; \
54             xd_datap += __offsp[2]; \
55             , \
56             ( ,x_datap += __tinc1_x - __tinc0_x * __tdims0 \
57             ,d_datap += __tinc1_d - __tinc0_d * __tdims0 \
58             ,xd_datap += __tinc1_xd - __tinc0_xd * __tdims0 \
59             ), \
60             ( ,x_datap += __tinc0_x \
61             ,d_datap += __tinc0_d \
62             ,xd_datap += __tinc0_xd \
63             ) \
64             )
65             #define PDL_BROADCASTLOOP_END_dseason_readdata PDL_BROADCASTLOOP_END( \
66             __privtrans->broadcast, \
67             x_datap -= __tinc1_x * __tdims1 + __offsp[0]; \
68             d_datap -= __tinc1_d * __tdims1 + __offsp[1]; \
69             xd_datap -= __tinc1_xd * __tdims1 + __offsp[2]; \
70             )
71 4           register PDL_Indx __inc_x_t = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,0,0)]; (void)__inc_x_t;
72 4           register PDL_Indx __inc_xd_t = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,2,0)]; (void)__inc_xd_t;
73             #ifndef PDL_DECLARE_PARAMS_dseason_1
74             #define PDL_DECLARE_PARAMS_dseason_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_d,PDL_PPSYM_PARAM_d) \
75             PDL_DECLARE_PARAMETER_BADVAL(PDL_TYPE_OP, x, (__privtrans->pdls[0]), 1, PDL_PPSYM_OP) \
76             PDL_DECLARE_PARAMETER_BADVAL(PDL_TYPE_PARAM_d, d, (__privtrans->pdls[1]), 1, PDL_PPSYM_PARAM_d) \
77             PDL_DECLARE_PARAMETER_BADVAL(PDL_TYPE_OP, xd, (__privtrans->pdls[2]), 1, PDL_PPSYM_OP)
78             #endif
79 4 100         if ( __privtrans->bvalflag ) { /* ** do 'bad' Code ** */
80             #define PDL_BAD_CODE
81             #define PDL_IF_BAD(t,f) t
82 2           switch (__privtrans->__datatype) { /* Start generic switch */
83 0           case PDL_F: {
84 0 0         PDL_DECLARE_PARAMS_dseason_1(PDL_Float,F,PDL_Indx,N)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
85 0 0         PDL_BROADCASTLOOP_START_dseason_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
86 0           PDL_Indx i, max = PDL_IF_BAD(,__privtrans->ind_sizes[0])-1, min = PDL_IF_BAD(-1,0);
87 0 0         PDL_Indx q = ((d_datap)[0] % 2)? ((d_datap)[0] - 1) / 2 : (d_datap)[0] / 2;
88             /*find good min and max ind*/
89 0 0         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
90 0 0         PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t))],x_badval,F,x_badval_isnan)) continue;,)
    0          
91 0 0         if (min < 0) min = t;
92 0           max = t;
93             }} /* Close t */
94 0 0         if ((d_datap)[0] % 2) {
95 0 0         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
96 0 0         PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
    0          
97 0           PDL_Float sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
98 0 0         for (i=-q; i<=q; i++) {
99 0           PDL_Indx ti = (t+i < min)? min
100 0 0         : (t+i > max)? max
101             : t+i
102             ;
103 0 0         PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,F,x_badval_isnan)) continue; dd++;,)
    0          
104 0           sum += (x_datap)[0+(__inc_x_t*(ti))];
105             }
106 0 0         PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
107 0           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
108             }} /* Close t */
109             } else {
110 0 0         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
111 0 0         PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
    0          
112 0           PDL_Float sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
113 0 0         for (i=-q; i<=q; i++) {
114 0           PDL_Indx ti = (t+i < min)? min
115 0 0         : (t+i > max)? max
116             : t+i
117             ;
118 0 0         PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,F,x_badval_isnan)) continue; dd++;,)
    0          
119 0 0         sum += (i == q || i == -q)? .5 * (x_datap)[0+(__inc_x_t*(ti))] : (x_datap)[0+(__inc_x_t*(ti))];
    0          
120             }
121 0 0         PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; }
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
122             dd--;
123             if ( (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,F,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,F,x_badval_isnan) )
124             || (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,F,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,F,x_badval_isnan) ) )
125             dd += .5;
126             ,)
127 0           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
128             }} /* Close t */
129             }
130 0 0         }PDL_BROADCASTLOOP_END_dseason_readdata
    0          
131 0           } break;
132 2           case PDL_D: {
133 2 50         PDL_DECLARE_PARAMS_dseason_1(PDL_Double,D,PDL_Indx,N)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
134 8 50         PDL_BROADCASTLOOP_START_dseason_readdata {
    50          
    50          
    50          
    50          
    100          
    100          
135 2           PDL_Indx i, max = PDL_IF_BAD(,__privtrans->ind_sizes[0])-1, min = PDL_IF_BAD(-1,0);
136 2 100         PDL_Indx q = ((d_datap)[0] % 2)? ((d_datap)[0] - 1) / 2 : (d_datap)[0] / 2;
137             /*find good min and max ind*/
138 22 100         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
139 20 50         PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t))],x_badval,D,x_badval_isnan)) continue;,)
    100          
140 18 100         if (min < 0) min = t;
141 18           max = t;
142             }} /* Close t */
143 2 100         if ((d_datap)[0] % 2) {
144 11 100         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
145 10 50         PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
    50          
146 10           PDL_Double sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
147 60 100         for (i=-q; i<=q; i++) {
148 100           PDL_Indx ti = (t+i < min)? min
149 50 100         : (t+i > max)? max
150             : t+i
151             ;
152 50 50         PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,D,x_badval_isnan)) continue; dd++;,)
    100          
153 45           sum += (x_datap)[0+(__inc_x_t*(ti))];
154             }
155 10 50         PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
156 10           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
157             }} /* Close t */
158             } else {
159 11 100         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
160 10 50         PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
    50          
161 10           PDL_Double sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
162 60 100         for (i=-q; i<=q; i++) {
163 100           PDL_Indx ti = (t+i < min)? min
164 50 100         : (t+i > max)? max
165             : t+i
166             ;
167 50 50         PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,D,x_badval_isnan)) continue; dd++;,)
    100          
168 45 100         sum += (i == q || i == -q)? .5 * (x_datap)[0+(__inc_x_t*(ti))] : (x_datap)[0+(__inc_x_t*(ti))];
    100          
169             }
170 10 50         PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; }
    50          
    0          
    100          
    50          
    0          
    50          
    50          
    0          
    100          
    50          
    0          
    50          
171             dd--;
172             if ( (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,D,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,D,x_badval_isnan) )
173             || (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,D,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,D,x_badval_isnan) ) )
174             dd += .5;
175             ,)
176 10           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
177             }} /* Close t */
178             }
179 2 50         }PDL_BROADCASTLOOP_END_dseason_readdata
    50          
180 2           } break;
181 0           default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in dseason: unhandled datatype(%d), only handles (FD)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype);
182             }
183             #undef PDL_BAD_CODE
184             #undef PDL_IF_BAD
185             } else { /* ** else do 'good' Code ** */
186             #define PDL_IF_BAD(t,f) f
187 2           switch (__privtrans->__datatype) { /* Start generic switch */
188 0           case PDL_F: {
189 0 0         PDL_DECLARE_PARAMS_dseason_1(PDL_Float,F,PDL_Indx,N)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
190 0 0         PDL_BROADCASTLOOP_START_dseason_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
191 0           PDL_Indx i, max = PDL_IF_BAD(,__privtrans->ind_sizes[0])-1, min = PDL_IF_BAD(-1,0);
192 0 0         PDL_Indx q = ((d_datap)[0] % 2)? ((d_datap)[0] - 1) / 2 : (d_datap)[0] / 2;
193             /*find good min and max ind*/
194 0 0         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
195             PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t))],x_badval,F,x_badval_isnan)) continue;,)
196 0 0         if (min < 0) min = t;
197 0           max = t;
198             }} /* Close t */
199 0 0         if ((d_datap)[0] % 2) {
200 0 0         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
201             PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
202 0           PDL_Float sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
203 0 0         for (i=-q; i<=q; i++) {
204 0           PDL_Indx ti = (t+i < min)? min
205 0 0         : (t+i > max)? max
206             : t+i
207             ;
208             PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,F,x_badval_isnan)) continue; dd++;,)
209 0           sum += (x_datap)[0+(__inc_x_t*(ti))];
210             }
211             PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
212 0           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
213             }} /* Close t */
214             } else {
215 0 0         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
216             PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
217 0           PDL_Float sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
218 0 0         for (i=-q; i<=q; i++) {
219 0           PDL_Indx ti = (t+i < min)? min
220 0 0         : (t+i > max)? max
221             : t+i
222             ;
223             PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,F,x_badval_isnan)) continue; dd++;,)
224 0 0         sum += (i == q || i == -q)? .5 * (x_datap)[0+(__inc_x_t*(ti))] : (x_datap)[0+(__inc_x_t*(ti))];
    0          
225             }
226             PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; }
227             dd--;
228             if ( (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,F,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,F,x_badval_isnan) )
229             || (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,F,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,F,x_badval_isnan) ) )
230             dd += .5;
231             ,)
232 0           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
233             }} /* Close t */
234             }
235 0 0         }PDL_BROADCASTLOOP_END_dseason_readdata
    0          
236 0           } break;
237 2           case PDL_D: {
238 2 50         PDL_DECLARE_PARAMS_dseason_1(PDL_Double,D,PDL_Indx,N)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
239 8 50         PDL_BROADCASTLOOP_START_dseason_readdata {
    50          
    50          
    50          
    50          
    100          
    100          
240 2           PDL_Indx i, max = PDL_IF_BAD(,__privtrans->ind_sizes[0])-1, min = PDL_IF_BAD(-1,0);
241 2 100         PDL_Indx q = ((d_datap)[0] % 2)? ((d_datap)[0] - 1) / 2 : (d_datap)[0] / 2;
242             /*find good min and max ind*/
243 22 100         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
244             PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t))],x_badval,D,x_badval_isnan)) continue;,)
245 20 50         if (min < 0) min = t;
246 20           max = t;
247             }} /* Close t */
248 2 100         if ((d_datap)[0] % 2) {
249 11 100         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
250             PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
251 10           PDL_Double sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
252 60 100         for (i=-q; i<=q; i++) {
253 100           PDL_Indx ti = (t+i < min)? min
254 50 100         : (t+i > max)? max
255             : t+i
256             ;
257             PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,D,x_badval_isnan)) continue; dd++;,)
258 50           sum += (x_datap)[0+(__inc_x_t*(ti))];
259             }
260             PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
261 10           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
262             }} /* Close t */
263             } else {
264 11 100         {/* Open t */ PDL_EXPAND2(register PDL_Indx t=0, __t_stop=(__t_size)); for(; t<__t_stop; t+=1) {
265             PDL_IF_BAD(if (t < min || t > max) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; },)
266 10           PDL_Double sum = 0; PDL_IF_BAD(PDL_Indx dd = 0;,)
267 60 100         for (i=-q; i<=q; i++) {
268 100           PDL_Indx ti = (t+i < min)? min
269 50 100         : (t+i > max)? max
270             : t+i
271             ;
272             PDL_IF_BAD(if (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(ti))],x_badval,D,x_badval_isnan)) continue; dd++;,)
273 50 100         sum += (i == q || i == -q)? .5 * (x_datap)[0+(__inc_x_t*(ti))] : (x_datap)[0+(__inc_x_t*(ti))];
    100          
274             }
275             PDL_IF_BAD(if (!dd) { (xd_datap)[0+(__inc_xd_t*(t))]=xd_badval; continue; }
276             dd--;
277             if ( (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,D,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,D,x_badval_isnan) )
278             || (PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t+q))],x_badval,D,x_badval_isnan) && !PDL_ISBAD2((x_datap)[0+(__inc_x_t*(t-q))],x_badval,D,x_badval_isnan) ) )
279             dd += .5;
280             ,)
281 10           (xd_datap)[0+(__inc_xd_t*(t))] = sum / PDL_IF_BAD(dd,(d_datap)[0]);
282             }} /* Close t */
283             }
284 2 50         }PDL_BROADCASTLOOP_END_dseason_readdata
    50          
285 2           } break;
286 0           default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in dseason: unhandled datatype(%d), only handles (FD)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype);
287             }
288             #undef PDL_IF_BAD
289             }
290 4           return PDL_err;
291             }
292              
293             static pdl_datatypes pdl_dseason_vtable_gentypes[] = { PDL_F, PDL_D, -1 };
294             static PDL_Indx pdl_dseason_vtable_realdims[] = { 1, 0, 1 };
295             static char *pdl_dseason_vtable_parnames[] = { "x","d","xd" };
296             static short pdl_dseason_vtable_parflags[] = {
297             0,
298             PDL_PARAM_ISTYPED,
299             PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISWRITE
300             };
301             static pdl_datatypes pdl_dseason_vtable_partypes[] = { -1, PDL_IND, -1 };
302             static PDL_Indx pdl_dseason_vtable_realdims_starts[] = { 0, 1, 1 };
303             static PDL_Indx pdl_dseason_vtable_realdims_ind_ids[] = { 0, 0 };
304             static char *pdl_dseason_vtable_indnames[] = { "t" };
305             pdl_transvtable pdl_dseason_vtable = {
306             PDL_TRANS_DO_BROADCAST|PDL_TRANS_BADPROCESS, 0, pdl_dseason_vtable_gentypes, 2, 3, NULL /*CORE21*/,
307             pdl_dseason_vtable_realdims, pdl_dseason_vtable_parnames,
308             pdl_dseason_vtable_parflags, pdl_dseason_vtable_partypes,
309             pdl_dseason_vtable_realdims_starts, pdl_dseason_vtable_realdims_ind_ids, 2,
310             1, pdl_dseason_vtable_indnames,
311             NULL, pdl_dseason_readdata, NULL,
312             NULL,
313             0,"PDL::Stats::TS::dseason"
314             };
315              
316              
317 4           pdl_error pdl_run_dseason(pdl *x,pdl *d,pdl *xd) {
318 4           pdl_error PDL_err = {0, NULL, 0};
319 4 50         if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0};
320 4           pdl_trans *__privtrans = PDL->create_trans(&pdl_dseason_vtable);
321 4 50         if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans");
322 4           __privtrans->pdls[0] = x;
323 4           __privtrans->pdls[1] = d;
324 4           __privtrans->pdls[2] = xd;
325 4 50         PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans));
326 4 50         PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans));
327 4           return PDL_err;
328             }