alglib4 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +47 -0
- data/ext/alglib/alglib.cpp +537 -0
- data/ext/alglib/alglib_array_converters.cpp +86 -0
- data/ext/alglib/alglib_array_converters.h +15 -0
- data/ext/alglib/alglib_utils.cpp +10 -0
- data/ext/alglib/alglib_utils.h +6 -0
- data/ext/alglib/alglibinternal.cpp +21749 -0
- data/ext/alglib/alglibinternal.h +2168 -0
- data/ext/alglib/alglibmisc.cpp +9106 -0
- data/ext/alglib/alglibmisc.h +2114 -0
- data/ext/alglib/ap.cpp +20094 -0
- data/ext/alglib/ap.h +7244 -0
- data/ext/alglib/dataanalysis.cpp +52588 -0
- data/ext/alglib/dataanalysis.h +10601 -0
- data/ext/alglib/diffequations.cpp +1342 -0
- data/ext/alglib/diffequations.h +282 -0
- data/ext/alglib/extconf.rb +5 -0
- data/ext/alglib/fasttransforms.cpp +4696 -0
- data/ext/alglib/fasttransforms.h +1018 -0
- data/ext/alglib/integration.cpp +4249 -0
- data/ext/alglib/integration.h +869 -0
- data/ext/alglib/interpolation.cpp +74502 -0
- data/ext/alglib/interpolation.h +12264 -0
- data/ext/alglib/kernels_avx2.cpp +2171 -0
- data/ext/alglib/kernels_avx2.h +201 -0
- data/ext/alglib/kernels_fma.cpp +1065 -0
- data/ext/alglib/kernels_fma.h +137 -0
- data/ext/alglib/kernels_sse2.cpp +735 -0
- data/ext/alglib/kernels_sse2.h +100 -0
- data/ext/alglib/linalg.cpp +65182 -0
- data/ext/alglib/linalg.h +9927 -0
- data/ext/alglib/optimization.cpp +135331 -0
- data/ext/alglib/optimization.h +19235 -0
- data/ext/alglib/solvers.cpp +20488 -0
- data/ext/alglib/solvers.h +4781 -0
- data/ext/alglib/specialfunctions.cpp +10672 -0
- data/ext/alglib/specialfunctions.h +2305 -0
- data/ext/alglib/statistics.cpp +19791 -0
- data/ext/alglib/statistics.h +1359 -0
- data/ext/alglib/stdafx.h +2 -0
- data/gpl2.txt +339 -0
- data/gpl3.txt +674 -0
- data/lib/alglib/version.rb +3 -0
- data/lib/alglib.rb +4 -0
- metadata +101 -0
@@ -0,0 +1,1018 @@
|
|
1
|
+
/*************************************************************************
|
2
|
+
ALGLIB 4.04.0 (source code generated 2024-12-21)
|
3
|
+
Copyright (c) Sergey Bochkanov (ALGLIB project).
|
4
|
+
|
5
|
+
>>> SOURCE LICENSE >>>
|
6
|
+
This program is free software; you can redistribute it and/or modify
|
7
|
+
it under the terms of the GNU General Public License as published by
|
8
|
+
the Free Software Foundation (www.fsf.org); either version 2 of the
|
9
|
+
License, or (at your option) any later version.
|
10
|
+
|
11
|
+
This program is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
15
|
+
|
16
|
+
A copy of the GNU General Public License is available at
|
17
|
+
http://www.fsf.org/licensing/licenses
|
18
|
+
>>> END OF LICENSE >>>
|
19
|
+
*************************************************************************/
|
20
|
+
#ifndef _fasttransforms_pkg_h
|
21
|
+
#define _fasttransforms_pkg_h
|
22
|
+
#include "ap.h"
|
23
|
+
#include "alglibinternal.h"
|
24
|
+
#include "alglibmisc.h"
|
25
|
+
|
26
|
+
/////////////////////////////////////////////////////////////////////////
|
27
|
+
//
|
28
|
+
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (DATATYPES)
|
29
|
+
//
|
30
|
+
/////////////////////////////////////////////////////////////////////////
|
31
|
+
namespace alglib_impl
|
32
|
+
{
|
33
|
+
#if defined(AE_COMPILE_FFT) || !defined(AE_PARTIAL_BUILD)
|
34
|
+
#endif
|
35
|
+
#if defined(AE_COMPILE_FHT) || !defined(AE_PARTIAL_BUILD)
|
36
|
+
#endif
|
37
|
+
#if defined(AE_COMPILE_CONV) || !defined(AE_PARTIAL_BUILD)
|
38
|
+
#endif
|
39
|
+
#if defined(AE_COMPILE_CORR) || !defined(AE_PARTIAL_BUILD)
|
40
|
+
#endif
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
/////////////////////////////////////////////////////////////////////////
|
45
|
+
//
|
46
|
+
// THIS SECTION CONTAINS C++ INTERFACE
|
47
|
+
//
|
48
|
+
/////////////////////////////////////////////////////////////////////////
|
49
|
+
namespace alglib
|
50
|
+
{
|
51
|
+
|
52
|
+
#if defined(AE_COMPILE_FFT) || !defined(AE_PARTIAL_BUILD)
|
53
|
+
|
54
|
+
#endif
|
55
|
+
|
56
|
+
#if defined(AE_COMPILE_FHT) || !defined(AE_PARTIAL_BUILD)
|
57
|
+
|
58
|
+
#endif
|
59
|
+
|
60
|
+
#if defined(AE_COMPILE_CONV) || !defined(AE_PARTIAL_BUILD)
|
61
|
+
|
62
|
+
#endif
|
63
|
+
|
64
|
+
#if defined(AE_COMPILE_CORR) || !defined(AE_PARTIAL_BUILD)
|
65
|
+
|
66
|
+
#endif
|
67
|
+
|
68
|
+
#if defined(AE_COMPILE_FFT) || !defined(AE_PARTIAL_BUILD)
|
69
|
+
/*************************************************************************
|
70
|
+
1-dimensional complex FFT.
|
71
|
+
|
72
|
+
Array size N may be arbitrary number (composite or prime). Composite N's
|
73
|
+
are handled with cache-oblivious variation of a Cooley-Tukey algorithm.
|
74
|
+
Small prime-factors are transformed using hard coded codelets (similar to
|
75
|
+
FFTW codelets, but without low-level optimization), large prime-factors
|
76
|
+
are handled with Bluestein's algorithm.
|
77
|
+
|
78
|
+
Fastests transforms are for smooth N's (prime factors are 2, 3, 5 only),
|
79
|
+
most fast for powers of 2. When N have prime factors larger than these,
|
80
|
+
but orders of magnitude smaller than N, computations will be about 4 times
|
81
|
+
slower than for nearby highly composite N's. When N itself is prime, speed
|
82
|
+
will be 6 times lower.
|
83
|
+
|
84
|
+
Algorithm has O(N*logN) complexity for any N (composite or prime).
|
85
|
+
|
86
|
+
INPUT PARAMETERS
|
87
|
+
A - array[0..N-1] - complex function to be transformed
|
88
|
+
N - problem size
|
89
|
+
|
90
|
+
OUTPUT PARAMETERS
|
91
|
+
A - DFT of a input array, array[0..N-1]
|
92
|
+
A_out[j] = SUM(A_in[k]*exp(-2*pi*sqrt(-1)*j*k/N), k = 0..N-1)
|
93
|
+
|
94
|
+
|
95
|
+
-- ALGLIB --
|
96
|
+
Copyright 29.05.2009 by Bochkanov Sergey
|
97
|
+
*************************************************************************/
|
98
|
+
void fftc1d(complex_1d_array &a, const ae_int_t n, const xparams _xparams = alglib::xdefault);
|
99
|
+
void fftc1d(complex_1d_array &a, const xparams _xparams = alglib::xdefault);
|
100
|
+
|
101
|
+
|
102
|
+
/*************************************************************************
|
103
|
+
1-dimensional complex inverse FFT.
|
104
|
+
|
105
|
+
Array size N may be arbitrary number (composite or prime). Algorithm has
|
106
|
+
O(N*logN) complexity for any N (composite or prime).
|
107
|
+
|
108
|
+
See FFTC1D() description for more information about algorithm performance.
|
109
|
+
|
110
|
+
INPUT PARAMETERS
|
111
|
+
A - array[0..N-1] - complex array to be transformed
|
112
|
+
N - problem size
|
113
|
+
|
114
|
+
OUTPUT PARAMETERS
|
115
|
+
A - inverse DFT of a input array, array[0..N-1]
|
116
|
+
A_out[j] = SUM(A_in[k]/N*exp(+2*pi*sqrt(-1)*j*k/N), k = 0..N-1)
|
117
|
+
|
118
|
+
|
119
|
+
-- ALGLIB --
|
120
|
+
Copyright 29.05.2009 by Bochkanov Sergey
|
121
|
+
*************************************************************************/
|
122
|
+
void fftc1dinv(complex_1d_array &a, const ae_int_t n, const xparams _xparams = alglib::xdefault);
|
123
|
+
void fftc1dinv(complex_1d_array &a, const xparams _xparams = alglib::xdefault);
|
124
|
+
|
125
|
+
|
126
|
+
/*************************************************************************
|
127
|
+
1-dimensional real FFT.
|
128
|
+
|
129
|
+
Algorithm has O(N*logN) complexity for any N (composite or prime).
|
130
|
+
|
131
|
+
INPUT PARAMETERS
|
132
|
+
A - array[0..N-1] - real function to be transformed
|
133
|
+
N - problem size
|
134
|
+
|
135
|
+
OUTPUT PARAMETERS
|
136
|
+
F - DFT of a input array, array[0..N-1]
|
137
|
+
F[j] = SUM(A[k]*exp(-2*pi*sqrt(-1)*j*k/N), k = 0..N-1)
|
138
|
+
|
139
|
+
NOTE: there is a buffered version of this function, FFTR1DBuf(), which
|
140
|
+
reuses memory previously allocated for A as much as possible.
|
141
|
+
|
142
|
+
NOTE:
|
143
|
+
F[] satisfies symmetry property F[k] = conj(F[N-k]), so just one half
|
144
|
+
of array is usually needed. But for convinience subroutine returns full
|
145
|
+
complex array (with frequencies above N/2), so its result may be used by
|
146
|
+
other FFT-related subroutines.
|
147
|
+
|
148
|
+
|
149
|
+
-- ALGLIB --
|
150
|
+
Copyright 01.06.2009 by Bochkanov Sergey
|
151
|
+
*************************************************************************/
|
152
|
+
void fftr1d(const real_1d_array &a, const ae_int_t n, complex_1d_array &f, const xparams _xparams = alglib::xdefault);
|
153
|
+
void fftr1d(const real_1d_array &a, complex_1d_array &f, const xparams _xparams = alglib::xdefault);
|
154
|
+
|
155
|
+
|
156
|
+
/*************************************************************************
|
157
|
+
1-dimensional real FFT, a buffered function which does not reallocate F[]
|
158
|
+
if its length is enough to store the result (i.e. it reuses previously
|
159
|
+
allocated memory as much as possible).
|
160
|
+
|
161
|
+
-- ALGLIB --
|
162
|
+
Copyright 01.06.2009 by Bochkanov Sergey
|
163
|
+
*************************************************************************/
|
164
|
+
void fftr1dbuf(const real_1d_array &a, const ae_int_t n, complex_1d_array &f, const xparams _xparams = alglib::xdefault);
|
165
|
+
void fftr1dbuf(const real_1d_array &a, complex_1d_array &f, const xparams _xparams = alglib::xdefault);
|
166
|
+
|
167
|
+
|
168
|
+
/*************************************************************************
|
169
|
+
1-dimensional real inverse FFT.
|
170
|
+
|
171
|
+
Algorithm has O(N*logN) complexity for any N (composite or prime).
|
172
|
+
|
173
|
+
INPUT PARAMETERS
|
174
|
+
F - array[0..floor(N/2)] - frequencies from forward real FFT
|
175
|
+
N - problem size
|
176
|
+
|
177
|
+
OUTPUT PARAMETERS
|
178
|
+
A - inverse DFT of a input array, array[0..N-1]
|
179
|
+
|
180
|
+
NOTE: there is a buffered version of this function, FFTR1DInvBuf(), which
|
181
|
+
reuses memory previously allocated for A as much as possible.
|
182
|
+
|
183
|
+
NOTE:
|
184
|
+
F[] should satisfy symmetry property F[k] = conj(F[N-k]), so just one
|
185
|
+
half of frequencies array is needed - elements from 0 to floor(N/2). F[0]
|
186
|
+
is ALWAYS real. If N is even F[floor(N/2)] is real too. If N is odd, then
|
187
|
+
F[floor(N/2)] has no special properties.
|
188
|
+
|
189
|
+
Relying on properties noted above, FFTR1DInv subroutine uses only elements
|
190
|
+
from 0th to floor(N/2)-th. It ignores imaginary part of F[0], and in case
|
191
|
+
N is even it ignores imaginary part of F[floor(N/2)] too.
|
192
|
+
|
193
|
+
When you call this function using full arguments list - "FFTR1DInv(F,N,A)"
|
194
|
+
- you can pass either either frequencies array with N elements or reduced
|
195
|
+
array with roughly N/2 elements - subroutine will successfully transform
|
196
|
+
both.
|
197
|
+
|
198
|
+
If you call this function using reduced arguments list - "FFTR1DInv(F,A)"
|
199
|
+
- you must pass FULL array with N elements (although higher N/2 are still
|
200
|
+
not used) because array size is used to automatically determine FFT length
|
201
|
+
|
202
|
+
-- ALGLIB --
|
203
|
+
Copyright 01.06.2009 by Bochkanov Sergey
|
204
|
+
*************************************************************************/
|
205
|
+
void fftr1dinv(const complex_1d_array &f, const ae_int_t n, real_1d_array &a, const xparams _xparams = alglib::xdefault);
|
206
|
+
void fftr1dinv(const complex_1d_array &f, real_1d_array &a, const xparams _xparams = alglib::xdefault);
|
207
|
+
|
208
|
+
|
209
|
+
/*************************************************************************
|
210
|
+
1-dimensional real inverse FFT, buffered version, which does not reallocate
|
211
|
+
A[] if its length is enough to store the result (i.e. it reuses previously
|
212
|
+
allocated memory as much as possible).
|
213
|
+
|
214
|
+
-- ALGLIB --
|
215
|
+
Copyright 01.06.2009 by Bochkanov Sergey
|
216
|
+
*************************************************************************/
|
217
|
+
void fftr1dinvbuf(const complex_1d_array &f, const ae_int_t n, real_1d_array &a, const xparams _xparams = alglib::xdefault);
|
218
|
+
void fftr1dinvbuf(const complex_1d_array &f, real_1d_array &a, const xparams _xparams = alglib::xdefault);
|
219
|
+
#endif
|
220
|
+
|
221
|
+
#if defined(AE_COMPILE_FHT) || !defined(AE_PARTIAL_BUILD)
|
222
|
+
/*************************************************************************
|
223
|
+
1-dimensional Fast Hartley Transform.
|
224
|
+
|
225
|
+
Algorithm has O(N*logN) complexity for any N (composite or prime).
|
226
|
+
|
227
|
+
INPUT PARAMETERS
|
228
|
+
A - array[0..N-1] - real function to be transformed
|
229
|
+
N - problem size
|
230
|
+
|
231
|
+
OUTPUT PARAMETERS
|
232
|
+
A - FHT of a input array, array[0..N-1],
|
233
|
+
A_out[k] = sum(A_in[j]*(cos(2*pi*j*k/N)+sin(2*pi*j*k/N)), j=0..N-1)
|
234
|
+
|
235
|
+
|
236
|
+
-- ALGLIB --
|
237
|
+
Copyright 04.06.2009 by Bochkanov Sergey
|
238
|
+
*************************************************************************/
|
239
|
+
void fhtr1d(real_1d_array &a, const ae_int_t n, const xparams _xparams = alglib::xdefault);
|
240
|
+
|
241
|
+
|
242
|
+
/*************************************************************************
|
243
|
+
1-dimensional inverse FHT.
|
244
|
+
|
245
|
+
Algorithm has O(N*logN) complexity for any N (composite or prime).
|
246
|
+
|
247
|
+
INPUT PARAMETERS
|
248
|
+
A - array[0..N-1] - complex array to be transformed
|
249
|
+
N - problem size
|
250
|
+
|
251
|
+
OUTPUT PARAMETERS
|
252
|
+
A - inverse FHT of a input array, array[0..N-1]
|
253
|
+
|
254
|
+
|
255
|
+
-- ALGLIB --
|
256
|
+
Copyright 29.05.2009 by Bochkanov Sergey
|
257
|
+
*************************************************************************/
|
258
|
+
void fhtr1dinv(real_1d_array &a, const ae_int_t n, const xparams _xparams = alglib::xdefault);
|
259
|
+
#endif
|
260
|
+
|
261
|
+
#if defined(AE_COMPILE_CONV) || !defined(AE_PARTIAL_BUILD)
|
262
|
+
/*************************************************************************
|
263
|
+
1-dimensional complex convolution.
|
264
|
+
|
265
|
+
For given A/B returns conv(A,B) (non-circular). Subroutine can automatically
|
266
|
+
choose between three implementations: straightforward O(M*N) formula for
|
267
|
+
very small N (or M), overlap-add algorithm for cases where max(M,N) is
|
268
|
+
significantly larger than min(M,N), but O(M*N) algorithm is too slow, and
|
269
|
+
general FFT-based formula for cases where two previous algorithms are too
|
270
|
+
slow.
|
271
|
+
|
272
|
+
Algorithm has max(M,N)*log(max(M,N)) complexity for any M/N.
|
273
|
+
|
274
|
+
INPUT PARAMETERS
|
275
|
+
A - array[M] - complex function to be transformed
|
276
|
+
M - problem size
|
277
|
+
B - array[N] - complex function to be transformed
|
278
|
+
N - problem size
|
279
|
+
|
280
|
+
OUTPUT PARAMETERS
|
281
|
+
R - convolution: A*B. array[N+M-1]
|
282
|
+
|
283
|
+
NOTE:
|
284
|
+
It is assumed that A is zero at T<0, B is zero too. If one or both
|
285
|
+
functions have non-zero values at negative T's, you can still use this
|
286
|
+
subroutine - just shift its result correspondingly.
|
287
|
+
|
288
|
+
NOTE: there is a buffered version of this function, ConvC1DBuf(), which
|
289
|
+
can reuse space previously allocated in its output parameter R.
|
290
|
+
|
291
|
+
-- ALGLIB --
|
292
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
293
|
+
*************************************************************************/
|
294
|
+
void convc1d(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
295
|
+
|
296
|
+
|
297
|
+
/*************************************************************************
|
298
|
+
1-dimensional complex convolution, buffered version of ConvC1DBuf(), which
|
299
|
+
does not reallocate R[] if its length is enough to store the result (i.e.
|
300
|
+
it reuses previously allocated memory as much as possible).
|
301
|
+
|
302
|
+
-- ALGLIB --
|
303
|
+
Copyright 30.11.2023 by Bochkanov Sergey
|
304
|
+
*************************************************************************/
|
305
|
+
void convc1dbuf(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
306
|
+
|
307
|
+
|
308
|
+
/*************************************************************************
|
309
|
+
1-dimensional complex non-circular deconvolution (inverse of ConvC1D()).
|
310
|
+
|
311
|
+
Algorithm has M*log(M)) complexity for any M (composite or prime).
|
312
|
+
|
313
|
+
INPUT PARAMETERS
|
314
|
+
A - array[0..M-1] - convolved signal, A = conv(R, B)
|
315
|
+
M - convolved signal length
|
316
|
+
B - array[0..N-1] - response
|
317
|
+
N - response length, N<=M
|
318
|
+
|
319
|
+
OUTPUT PARAMETERS
|
320
|
+
R - deconvolved signal. array[0..M-N].
|
321
|
+
|
322
|
+
NOTE:
|
323
|
+
deconvolution is unstable process and may result in division by zero
|
324
|
+
(if your response function is degenerate, i.e. has zero Fourier coefficient).
|
325
|
+
|
326
|
+
NOTE:
|
327
|
+
It is assumed that A is zero at T<0, B is zero too. If one or both
|
328
|
+
functions have non-zero values at negative T's, you can still use this
|
329
|
+
subroutine - just shift its result correspondingly.
|
330
|
+
|
331
|
+
NOTE: there is a buffered version of this function, ConvC1DInvBuf(),
|
332
|
+
which can reuse space previously allocated in its output parameter R
|
333
|
+
|
334
|
+
-- ALGLIB --
|
335
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
336
|
+
*************************************************************************/
|
337
|
+
void convc1dinv(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
338
|
+
|
339
|
+
|
340
|
+
/*************************************************************************
|
341
|
+
1-dimensional complex non-circular deconvolution (inverse of ConvC1D()).
|
342
|
+
|
343
|
+
A buffered version, which does not reallocate R[] if its length is enough
|
344
|
+
to store the result (i.e. it reuses previously allocated memory as much as
|
345
|
+
possible).
|
346
|
+
|
347
|
+
-- ALGLIB --
|
348
|
+
Copyright 30.11.2023 by Bochkanov Sergey
|
349
|
+
*************************************************************************/
|
350
|
+
void convc1dinvbuf(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
351
|
+
|
352
|
+
|
353
|
+
/*************************************************************************
|
354
|
+
1-dimensional circular complex convolution.
|
355
|
+
|
356
|
+
For given S/R returns conv(S,R) (circular). Algorithm has linearithmic
|
357
|
+
complexity for any M/N.
|
358
|
+
|
359
|
+
IMPORTANT: normal convolution is commutative, i.e. it is symmetric -
|
360
|
+
conv(A,B)=conv(B,A). Cyclic convolution IS NOT. One function - S - is a
|
361
|
+
signal, periodic function, and another - R - is a response, non-periodic
|
362
|
+
function with limited length.
|
363
|
+
|
364
|
+
INPUT PARAMETERS
|
365
|
+
S - array[M] - complex periodic signal
|
366
|
+
M - problem size
|
367
|
+
B - array[N] - complex non-periodic response
|
368
|
+
N - problem size
|
369
|
+
|
370
|
+
OUTPUT PARAMETERS
|
371
|
+
R - convolution: A*B. array[M].
|
372
|
+
|
373
|
+
NOTE:
|
374
|
+
It is assumed that B is zero at T<0. If it has non-zero values at
|
375
|
+
negative T's, you can still use this subroutine - just shift its result
|
376
|
+
correspondingly.
|
377
|
+
|
378
|
+
NOTE: there is a buffered version of this function, ConvC1DCircularBuf(),
|
379
|
+
which can reuse space previously allocated in its output parameter R.
|
380
|
+
|
381
|
+
-- ALGLIB --
|
382
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
383
|
+
*************************************************************************/
|
384
|
+
void convc1dcircular(const complex_1d_array &s, const ae_int_t m, const complex_1d_array &r, const ae_int_t n, complex_1d_array &c, const xparams _xparams = alglib::xdefault);
|
385
|
+
|
386
|
+
|
387
|
+
/*************************************************************************
|
388
|
+
1-dimensional circular complex convolution.
|
389
|
+
|
390
|
+
Buffered version of ConvC1DCircular(), which does not reallocate C[] if
|
391
|
+
its length is enough to store the result (i.e. it reuses previously
|
392
|
+
allocated memory as much as possible).
|
393
|
+
|
394
|
+
-- ALGLIB --
|
395
|
+
Copyright 30.11.2023 by Bochkanov Sergey
|
396
|
+
*************************************************************************/
|
397
|
+
void convc1dcircularbuf(const complex_1d_array &s, const ae_int_t m, const complex_1d_array &r, const ae_int_t n, complex_1d_array &c, const xparams _xparams = alglib::xdefault);
|
398
|
+
|
399
|
+
|
400
|
+
/*************************************************************************
|
401
|
+
1-dimensional circular complex deconvolution (inverse of ConvC1DCircular()).
|
402
|
+
|
403
|
+
Algorithm has M*log(M)) complexity for any M (composite or prime).
|
404
|
+
|
405
|
+
INPUT PARAMETERS
|
406
|
+
A - array[0..M-1] - convolved periodic signal, A = conv(R, B)
|
407
|
+
M - convolved signal length
|
408
|
+
B - array[0..N-1] - non-periodic response
|
409
|
+
N - response length
|
410
|
+
|
411
|
+
OUTPUT PARAMETERS
|
412
|
+
R - deconvolved signal. array[0..M-1].
|
413
|
+
|
414
|
+
NOTE:
|
415
|
+
deconvolution is unstable process and may result in division by zero
|
416
|
+
(if your response function is degenerate, i.e. has zero Fourier coefficient).
|
417
|
+
|
418
|
+
NOTE:
|
419
|
+
It is assumed that B is zero at T<0. If it has non-zero values at
|
420
|
+
negative T's, you can still use this subroutine - just shift its result
|
421
|
+
correspondingly.
|
422
|
+
|
423
|
+
NOTE: there is a buffered version of this function, ConvC1DCircularInvBuf(),
|
424
|
+
which can reuse space previously allocated in its output parameter R.
|
425
|
+
|
426
|
+
-- ALGLIB --
|
427
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
428
|
+
*************************************************************************/
|
429
|
+
void convc1dcircularinv(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
430
|
+
|
431
|
+
|
432
|
+
/*************************************************************************
|
433
|
+
1-dimensional circular complex deconvolution (inverse of ConvC1DCircular()).
|
434
|
+
|
435
|
+
Buffered version of ConvC1DCircularInv(), which does not reallocate R[] if
|
436
|
+
its length is enough to store the result (i.e. it reuses previously
|
437
|
+
allocated memory as much as possible).
|
438
|
+
|
439
|
+
-- ALGLIB --
|
440
|
+
Copyright 30.11.2023 by Bochkanov Sergey
|
441
|
+
*************************************************************************/
|
442
|
+
void convc1dcircularinvbuf(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
443
|
+
|
444
|
+
|
445
|
+
/*************************************************************************
|
446
|
+
1-dimensional real convolution.
|
447
|
+
|
448
|
+
Analogous to ConvC1D(), see ConvC1D() comments for more details.
|
449
|
+
|
450
|
+
INPUT PARAMETERS
|
451
|
+
A - array[0..M-1] - real function to be transformed
|
452
|
+
M - problem size
|
453
|
+
B - array[0..N-1] - real function to be transformed
|
454
|
+
N - problem size
|
455
|
+
|
456
|
+
OUTPUT PARAMETERS
|
457
|
+
R - convolution: A*B. array[0..N+M-2].
|
458
|
+
|
459
|
+
NOTE:
|
460
|
+
It is assumed that A is zero at T<0, B is zero too. If one or both
|
461
|
+
functions have non-zero values at negative T's, you can still use this
|
462
|
+
subroutine - just shift its result correspondingly.
|
463
|
+
|
464
|
+
NOTE: there is a buffered version of this function, ConvR1DBuf(),
|
465
|
+
which can reuse space previously allocated in its output parameter R.
|
466
|
+
|
467
|
+
|
468
|
+
-- ALGLIB --
|
469
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
470
|
+
*************************************************************************/
|
471
|
+
void convr1d(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
472
|
+
|
473
|
+
|
474
|
+
/*************************************************************************
|
475
|
+
1-dimensional real convolution.
|
476
|
+
|
477
|
+
Buffered version of ConvR1D(), which does not reallocate R[] if its length
|
478
|
+
is enough to store the result (i.e. it reuses previously allocated memory
|
479
|
+
as much as possible).
|
480
|
+
|
481
|
+
-- ALGLIB --
|
482
|
+
Copyright 30.11.2023 by Bochkanov Sergey
|
483
|
+
*************************************************************************/
|
484
|
+
void convr1dbuf(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
485
|
+
|
486
|
+
|
487
|
+
/*************************************************************************
|
488
|
+
1-dimensional real deconvolution (inverse of ConvC1D()).
|
489
|
+
|
490
|
+
Algorithm has M*log(M)) complexity for any M (composite or prime).
|
491
|
+
|
492
|
+
INPUT PARAMETERS
|
493
|
+
A - array[0..M-1] - convolved signal, A = conv(R, B)
|
494
|
+
M - convolved signal length
|
495
|
+
B - array[0..N-1] - response
|
496
|
+
N - response length, N<=M
|
497
|
+
|
498
|
+
OUTPUT PARAMETERS
|
499
|
+
R - deconvolved signal. array[0..M-N].
|
500
|
+
|
501
|
+
NOTE:
|
502
|
+
deconvolution is unstable process and may result in division by zero
|
503
|
+
(if your response function is degenerate, i.e. has zero Fourier coefficient).
|
504
|
+
|
505
|
+
NOTE:
|
506
|
+
It is assumed that A is zero at T<0, B is zero too. If one or both
|
507
|
+
functions have non-zero values at negative T's, you can still use this
|
508
|
+
subroutine - just shift its result correspondingly.
|
509
|
+
|
510
|
+
NOTE: there is a buffered version of this function, ConvR1DInvBuf(),
|
511
|
+
which can reuse space previously allocated in its output parameter R.
|
512
|
+
|
513
|
+
-- ALGLIB --
|
514
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
515
|
+
*************************************************************************/
|
516
|
+
void convr1dinv(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
517
|
+
|
518
|
+
|
519
|
+
/*************************************************************************
|
520
|
+
1-dimensional real deconvolution (inverse of ConvR1D()), buffered version,
|
521
|
+
which does not reallocate R[] if its length is enough to store the result
|
522
|
+
(i.e. it reuses previously allocated memory as much as possible).
|
523
|
+
|
524
|
+
|
525
|
+
-- ALGLIB --
|
526
|
+
Copyright 30.11.2023 by Bochkanov Sergey
|
527
|
+
*************************************************************************/
|
528
|
+
void convr1dinvbuf(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
529
|
+
|
530
|
+
|
531
|
+
/*************************************************************************
|
532
|
+
1-dimensional circular real convolution.
|
533
|
+
|
534
|
+
Analogous to ConvC1DCircular(), see ConvC1DCircular() comments for more details.
|
535
|
+
|
536
|
+
INPUT PARAMETERS
|
537
|
+
S - array[0..M-1] - real signal
|
538
|
+
M - problem size
|
539
|
+
B - array[0..N-1] - real response
|
540
|
+
N - problem size
|
541
|
+
|
542
|
+
OUTPUT PARAMETERS
|
543
|
+
R - convolution: A*B. array[0..M-1].
|
544
|
+
|
545
|
+
NOTE:
|
546
|
+
It is assumed that B is zero at T<0. If it has non-zero values at
|
547
|
+
negative T's, you can still use this subroutine - just shift its result
|
548
|
+
correspondingly.
|
549
|
+
|
550
|
+
NOTE: there is a buffered version of this function, ConvR1DCurcularBuf(),
|
551
|
+
which can reuse space previously allocated in its output parameter R.
|
552
|
+
|
553
|
+
-- ALGLIB --
|
554
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
555
|
+
*************************************************************************/
|
556
|
+
void convr1dcircular(const real_1d_array &s, const ae_int_t m, const real_1d_array &r, const ae_int_t n, real_1d_array &c, const xparams _xparams = alglib::xdefault);
|
557
|
+
|
558
|
+
|
559
|
+
/*************************************************************************
|
560
|
+
1-dimensional circular real convolution, buffered version, which does not
|
561
|
+
reallocate C[] if its length is enough to store the result (i.e. it reuses
|
562
|
+
previously allocated memory as much as possible).
|
563
|
+
|
564
|
+
-- ALGLIB --
|
565
|
+
Copyright 30.11.2023 by Bochkanov Sergey
|
566
|
+
*************************************************************************/
|
567
|
+
void convr1dcircularbuf(const real_1d_array &s, const ae_int_t m, const real_1d_array &r, const ae_int_t n, real_1d_array &c, const xparams _xparams = alglib::xdefault);
|
568
|
+
|
569
|
+
|
570
|
+
/*************************************************************************
|
571
|
+
1-dimensional complex deconvolution (inverse of ConvC1D()).
|
572
|
+
|
573
|
+
Algorithm has M*log(M)) complexity for any M (composite or prime).
|
574
|
+
|
575
|
+
INPUT PARAMETERS
|
576
|
+
A - array[0..M-1] - convolved signal, A = conv(R, B)
|
577
|
+
M - convolved signal length
|
578
|
+
B - array[0..N-1] - response
|
579
|
+
N - response length
|
580
|
+
|
581
|
+
OUTPUT PARAMETERS
|
582
|
+
R - deconvolved signal. array[0..M-N].
|
583
|
+
|
584
|
+
NOTE:
|
585
|
+
deconvolution is unstable process and may result in division by zero
|
586
|
+
(if your response function is degenerate, i.e. has zero Fourier coefficient).
|
587
|
+
|
588
|
+
NOTE:
|
589
|
+
It is assumed that B is zero at T<0. If it has non-zero values at
|
590
|
+
negative T's, you can still use this subroutine - just shift its result
|
591
|
+
correspondingly.
|
592
|
+
|
593
|
+
-- ALGLIB --
|
594
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
595
|
+
*************************************************************************/
|
596
|
+
void convr1dcircularinv(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
597
|
+
|
598
|
+
|
599
|
+
/*************************************************************************
|
600
|
+
1-dimensional complex deconvolution, inverse of ConvR1DCircular().
|
601
|
+
|
602
|
+
Buffered version, which does not reallocate R[] if its length is enough to
|
603
|
+
store the result (i.e. it reuses previously allocated memory as much as
|
604
|
+
possible).
|
605
|
+
|
606
|
+
-- ALGLIB --
|
607
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
608
|
+
*************************************************************************/
|
609
|
+
void convr1dcircularinvbuf(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
610
|
+
#endif
|
611
|
+
|
612
|
+
#if defined(AE_COMPILE_CORR) || !defined(AE_PARTIAL_BUILD)
|
613
|
+
/*************************************************************************
|
614
|
+
1-dimensional complex cross-correlation.
|
615
|
+
|
616
|
+
For given Pattern/Signal returns corr(Pattern,Signal) (non-circular).
|
617
|
+
|
618
|
+
Correlation is calculated using reduction to convolution. Algorithm with
|
619
|
+
max(N,N)*log(max(N,N)) complexity is used (see ConvC1D() for more info
|
620
|
+
about performance).
|
621
|
+
|
622
|
+
IMPORTANT:
|
623
|
+
for historical reasons subroutine accepts its parameters in reversed
|
624
|
+
order: CorrC1D(Signal, Pattern) = Pattern x Signal (using traditional
|
625
|
+
definition of cross-correlation, denoting cross-correlation as "x").
|
626
|
+
|
627
|
+
INPUT PARAMETERS
|
628
|
+
Signal - array[0..N-1] - complex function to be transformed,
|
629
|
+
signal containing pattern
|
630
|
+
N - problem size
|
631
|
+
Pattern - array[0..M-1] - complex function to be transformed,
|
632
|
+
pattern to 'search' within a signal
|
633
|
+
M - problem size
|
634
|
+
|
635
|
+
OUTPUT PARAMETERS
|
636
|
+
R - cross-correlation, array[0..N+M-2]:
|
637
|
+
* positive lags are stored in R[0..N-1],
|
638
|
+
R[i] = sum(conj(pattern[j])*signal[i+j]
|
639
|
+
* negative lags are stored in R[N..N+M-2],
|
640
|
+
R[N+M-1-i] = sum(conj(pattern[j])*signal[-i+j]
|
641
|
+
|
642
|
+
NOTE:
|
643
|
+
It is assumed that pattern domain is [0..M-1]. If Pattern is non-zero
|
644
|
+
on [-K..M-1], you can still use this subroutine, just shift result by K.
|
645
|
+
|
646
|
+
NOTE: there is a buffered version of this function, CorrC1DBuf(), which
|
647
|
+
can reuse space previously allocated in its output parameter R.
|
648
|
+
|
649
|
+
-- ALGLIB --
|
650
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
651
|
+
*************************************************************************/
|
652
|
+
void corrc1d(const complex_1d_array &signal, const ae_int_t n, const complex_1d_array &pattern, const ae_int_t m, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
653
|
+
|
654
|
+
|
655
|
+
/*************************************************************************
|
656
|
+
1-dimensional complex cross-correlation, a buffered version of CorrC1D()
|
657
|
+
which does not reallocate R[] if its length is enough to store the result
|
658
|
+
(i.e. it reuses previously allocated memory as much as possible).
|
659
|
+
|
660
|
+
-- ALGLIB --
|
661
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
662
|
+
*************************************************************************/
|
663
|
+
void corrc1dbuf(const complex_1d_array &signal, const ae_int_t n, const complex_1d_array &pattern, const ae_int_t m, complex_1d_array &r, const xparams _xparams = alglib::xdefault);
|
664
|
+
|
665
|
+
|
666
|
+
/*************************************************************************
|
667
|
+
1-dimensional circular complex cross-correlation.
|
668
|
+
|
669
|
+
For given Pattern/Signal returns corr(Pattern,Signal) (circular).
|
670
|
+
Algorithm has linearithmic complexity for any M/N.
|
671
|
+
|
672
|
+
IMPORTANT:
|
673
|
+
for historical reasons subroutine accepts its parameters in reversed
|
674
|
+
order: CorrC1DCircular(Signal, Pattern) = Pattern x Signal (using
|
675
|
+
traditional definition of cross-correlation, denoting cross-correlation
|
676
|
+
as "x").
|
677
|
+
|
678
|
+
INPUT PARAMETERS
|
679
|
+
Signal - array[0..N-1] - complex function to be transformed,
|
680
|
+
periodic signal containing pattern
|
681
|
+
N - problem size
|
682
|
+
Pattern - array[0..M-1] - complex function to be transformed,
|
683
|
+
non-periodic pattern to 'search' within a signal
|
684
|
+
M - problem size
|
685
|
+
|
686
|
+
OUTPUT PARAMETERS
|
687
|
+
R - convolution: A*B. array[0..M-1].
|
688
|
+
|
689
|
+
NOTE: there is a buffered version of this function, CorrC1DCircular(),
|
690
|
+
which can reuse space previously allocated in its output parameter R.
|
691
|
+
|
692
|
+
-- ALGLIB --
|
693
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
694
|
+
*************************************************************************/
|
695
|
+
void corrc1dcircular(const complex_1d_array &signal, const ae_int_t m, const complex_1d_array &pattern, const ae_int_t n, complex_1d_array &c, const xparams _xparams = alglib::xdefault);
|
696
|
+
|
697
|
+
|
698
|
+
/*************************************************************************
|
699
|
+
1-dimensional circular complex cross-correlation.
|
700
|
+
|
701
|
+
A buffered function which does not reallocate C[] if its length is enough
|
702
|
+
to store the result (i.e. it reuses previously allocated memory as much as
|
703
|
+
possible).
|
704
|
+
|
705
|
+
-- ALGLIB --
|
706
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
707
|
+
*************************************************************************/
|
708
|
+
void corrc1dcircularbuf(const complex_1d_array &signal, const ae_int_t m, const complex_1d_array &pattern, const ae_int_t n, complex_1d_array &c, const xparams _xparams = alglib::xdefault);
|
709
|
+
|
710
|
+
|
711
|
+
/*************************************************************************
|
712
|
+
1-dimensional real cross-correlation.
|
713
|
+
|
714
|
+
For given Pattern/Signal returns corr(Pattern,Signal) (non-circular).
|
715
|
+
|
716
|
+
Correlation is calculated using reduction to convolution. Algorithm with
|
717
|
+
max(N,N)*log(max(N,N)) complexity is used (see ConvC1D() for more info
|
718
|
+
about performance).
|
719
|
+
|
720
|
+
IMPORTANT:
|
721
|
+
for historical reasons subroutine accepts its parameters in reversed
|
722
|
+
order: CorrR1D(Signal, Pattern) = Pattern x Signal (using traditional
|
723
|
+
definition of cross-correlation, denoting cross-correlation as "x").
|
724
|
+
|
725
|
+
INPUT PARAMETERS
|
726
|
+
Signal - array[0..N-1] - real function to be transformed,
|
727
|
+
signal containing pattern
|
728
|
+
N - problem size
|
729
|
+
Pattern - array[0..M-1] - real function to be transformed,
|
730
|
+
pattern to 'search' withing signal
|
731
|
+
M - problem size
|
732
|
+
|
733
|
+
OUTPUT PARAMETERS
|
734
|
+
R - cross-correlation, array[0..N+M-2]:
|
735
|
+
* positive lags are stored in R[0..N-1],
|
736
|
+
R[i] = sum(pattern[j]*signal[i+j]
|
737
|
+
* negative lags are stored in R[N..N+M-2],
|
738
|
+
R[N+M-1-i] = sum(pattern[j]*signal[-i+j]
|
739
|
+
|
740
|
+
NOTE:
|
741
|
+
It is assumed that pattern domain is [0..M-1]. If Pattern is non-zero
|
742
|
+
on [-K..M-1], you can still use this subroutine, just shift result by K.
|
743
|
+
|
744
|
+
NOTE: there is a buffered version of this function, CorrR1DBuf(), which
|
745
|
+
can reuse space previously allocated in its output parameter R.
|
746
|
+
|
747
|
+
-- ALGLIB --
|
748
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
749
|
+
*************************************************************************/
|
750
|
+
void corrr1d(const real_1d_array &signal, const ae_int_t n, const real_1d_array &pattern, const ae_int_t m, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
751
|
+
|
752
|
+
|
753
|
+
/*************************************************************************
|
754
|
+
1-dimensional real cross-correlation, buffered function, which does not
|
755
|
+
reallocate R[] if its length is enough to store the result (i.e. it reuses
|
756
|
+
previously allocated memory as much as possible).
|
757
|
+
|
758
|
+
-- ALGLIB --
|
759
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
760
|
+
*************************************************************************/
|
761
|
+
void corrr1dbuf(const real_1d_array &signal, const ae_int_t n, const real_1d_array &pattern, const ae_int_t m, real_1d_array &r, const xparams _xparams = alglib::xdefault);
|
762
|
+
|
763
|
+
|
764
|
+
/*************************************************************************
|
765
|
+
1-dimensional circular real cross-correlation.
|
766
|
+
|
767
|
+
For given Pattern/Signal returns corr(Pattern,Signal) (circular).
|
768
|
+
Algorithm has linearithmic complexity for any M/N.
|
769
|
+
|
770
|
+
IMPORTANT:
|
771
|
+
for historical reasons subroutine accepts its parameters in reversed
|
772
|
+
order: CorrR1DCircular(Signal, Pattern) = Pattern x Signal (using
|
773
|
+
traditional definition of cross-correlation, denoting cross-correlation
|
774
|
+
as "x").
|
775
|
+
|
776
|
+
INPUT PARAMETERS
|
777
|
+
Signal - array[0..N-1] - real function to be transformed,
|
778
|
+
periodic signal containing pattern
|
779
|
+
N - problem size
|
780
|
+
Pattern - array[0..M-1] - real function to be transformed,
|
781
|
+
non-periodic pattern to search withing signal
|
782
|
+
M - problem size
|
783
|
+
|
784
|
+
OUTPUT PARAMETERS
|
785
|
+
R - convolution: A*B. array[0..M-1].
|
786
|
+
|
787
|
+
NOTE: there is a buffered version of this function, CorrR1DCircularBuf(),
|
788
|
+
which can reuse space previously allocated in its output parameter C.
|
789
|
+
|
790
|
+
-- ALGLIB --
|
791
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
792
|
+
*************************************************************************/
|
793
|
+
void corrr1dcircular(const real_1d_array &signal, const ae_int_t m, const real_1d_array &pattern, const ae_int_t n, real_1d_array &c, const xparams _xparams = alglib::xdefault);
|
794
|
+
|
795
|
+
|
796
|
+
/*************************************************************************
|
797
|
+
1-dimensional circular real cross-correlation, buffered version , which
|
798
|
+
does not reallocate C[] if its length is enough to store the result (i.e.
|
799
|
+
it reuses previously allocated memory as much as possible).
|
800
|
+
|
801
|
+
-- ALGLIB --
|
802
|
+
Copyright 21.07.2009 by Bochkanov Sergey
|
803
|
+
*************************************************************************/
|
804
|
+
void corrr1dcircularbuf(const real_1d_array &signal, const ae_int_t m, const real_1d_array &pattern, const ae_int_t n, real_1d_array &c, const xparams _xparams = alglib::xdefault);
|
805
|
+
#endif
|
806
|
+
}
|
807
|
+
|
808
|
+
/////////////////////////////////////////////////////////////////////////
|
809
|
+
//
|
810
|
+
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (FUNCTIONS)
|
811
|
+
//
|
812
|
+
/////////////////////////////////////////////////////////////////////////
|
813
|
+
namespace alglib_impl
|
814
|
+
{
|
815
|
+
#if defined(AE_COMPILE_FFT) || !defined(AE_PARTIAL_BUILD)
|
816
|
+
void fftc1d(/* Complex */ ae_vector* a, ae_int_t n, ae_state *_state);
|
817
|
+
void fftc1dinv(/* Complex */ ae_vector* a, ae_int_t n, ae_state *_state);
|
818
|
+
void fftr1d(/* Real */ const ae_vector* a,
|
819
|
+
ae_int_t n,
|
820
|
+
/* Complex */ ae_vector* f,
|
821
|
+
ae_state *_state);
|
822
|
+
void fftr1dbuf(/* Real */ const ae_vector* a,
|
823
|
+
ae_int_t n,
|
824
|
+
/* Complex */ ae_vector* f,
|
825
|
+
ae_state *_state);
|
826
|
+
void fftr1dinv(/* Complex */ const ae_vector* f,
|
827
|
+
ae_int_t n,
|
828
|
+
/* Real */ ae_vector* a,
|
829
|
+
ae_state *_state);
|
830
|
+
void fftr1dinvbuf(/* Complex */ const ae_vector* f,
|
831
|
+
ae_int_t n,
|
832
|
+
/* Real */ ae_vector* a,
|
833
|
+
ae_state *_state);
|
834
|
+
void fftr1dinternaleven(/* Real */ ae_vector* a,
|
835
|
+
ae_int_t n,
|
836
|
+
/* Real */ ae_vector* buf,
|
837
|
+
fasttransformplan* plan,
|
838
|
+
ae_state *_state);
|
839
|
+
void fftr1dinvinternaleven(/* Real */ ae_vector* a,
|
840
|
+
ae_int_t n,
|
841
|
+
/* Real */ ae_vector* buf,
|
842
|
+
fasttransformplan* plan,
|
843
|
+
ae_state *_state);
|
844
|
+
#endif
|
845
|
+
#if defined(AE_COMPILE_FHT) || !defined(AE_PARTIAL_BUILD)
|
846
|
+
void fhtr1d(/* Real */ ae_vector* a, ae_int_t n, ae_state *_state);
|
847
|
+
void fhtr1dinv(/* Real */ ae_vector* a, ae_int_t n, ae_state *_state);
|
848
|
+
#endif
|
849
|
+
#if defined(AE_COMPILE_CONV) || !defined(AE_PARTIAL_BUILD)
|
850
|
+
void convc1d(/* Complex */ const ae_vector* a,
|
851
|
+
ae_int_t m,
|
852
|
+
/* Complex */ const ae_vector* b,
|
853
|
+
ae_int_t n,
|
854
|
+
/* Complex */ ae_vector* r,
|
855
|
+
ae_state *_state);
|
856
|
+
void convc1dbuf(/* Complex */ const ae_vector* a,
|
857
|
+
ae_int_t m,
|
858
|
+
/* Complex */ const ae_vector* b,
|
859
|
+
ae_int_t n,
|
860
|
+
/* Complex */ ae_vector* r,
|
861
|
+
ae_state *_state);
|
862
|
+
void convc1dinv(/* Complex */ const ae_vector* a,
|
863
|
+
ae_int_t m,
|
864
|
+
/* Complex */ const ae_vector* b,
|
865
|
+
ae_int_t n,
|
866
|
+
/* Complex */ ae_vector* r,
|
867
|
+
ae_state *_state);
|
868
|
+
void convc1dinvbuf(/* Complex */ const ae_vector* a,
|
869
|
+
ae_int_t m,
|
870
|
+
/* Complex */ const ae_vector* b,
|
871
|
+
ae_int_t n,
|
872
|
+
/* Complex */ ae_vector* r,
|
873
|
+
ae_state *_state);
|
874
|
+
void convc1dcircular(/* Complex */ const ae_vector* s,
|
875
|
+
ae_int_t m,
|
876
|
+
/* Complex */ const ae_vector* r,
|
877
|
+
ae_int_t n,
|
878
|
+
/* Complex */ ae_vector* c,
|
879
|
+
ae_state *_state);
|
880
|
+
void convc1dcircularbuf(/* Complex */ const ae_vector* s,
|
881
|
+
ae_int_t m,
|
882
|
+
/* Complex */ const ae_vector* r,
|
883
|
+
ae_int_t n,
|
884
|
+
/* Complex */ ae_vector* c,
|
885
|
+
ae_state *_state);
|
886
|
+
void convc1dcircularinv(/* Complex */ const ae_vector* a,
|
887
|
+
ae_int_t m,
|
888
|
+
/* Complex */ const ae_vector* b,
|
889
|
+
ae_int_t n,
|
890
|
+
/* Complex */ ae_vector* r,
|
891
|
+
ae_state *_state);
|
892
|
+
void convc1dcircularinvbuf(/* Complex */ const ae_vector* a,
|
893
|
+
ae_int_t m,
|
894
|
+
/* Complex */ const ae_vector* b,
|
895
|
+
ae_int_t n,
|
896
|
+
/* Complex */ ae_vector* r,
|
897
|
+
ae_state *_state);
|
898
|
+
void convr1d(/* Real */ const ae_vector* a,
|
899
|
+
ae_int_t m,
|
900
|
+
/* Real */ const ae_vector* b,
|
901
|
+
ae_int_t n,
|
902
|
+
/* Real */ ae_vector* r,
|
903
|
+
ae_state *_state);
|
904
|
+
void convr1dbuf(/* Real */ const ae_vector* a,
|
905
|
+
ae_int_t m,
|
906
|
+
/* Real */ const ae_vector* b,
|
907
|
+
ae_int_t n,
|
908
|
+
/* Real */ ae_vector* r,
|
909
|
+
ae_state *_state);
|
910
|
+
void convr1dinv(/* Real */ const ae_vector* a,
|
911
|
+
ae_int_t m,
|
912
|
+
/* Real */ const ae_vector* b,
|
913
|
+
ae_int_t n,
|
914
|
+
/* Real */ ae_vector* r,
|
915
|
+
ae_state *_state);
|
916
|
+
void convr1dinvbuf(/* Real */ const ae_vector* a,
|
917
|
+
ae_int_t m,
|
918
|
+
/* Real */ const ae_vector* b,
|
919
|
+
ae_int_t n,
|
920
|
+
/* Real */ ae_vector* r,
|
921
|
+
ae_state *_state);
|
922
|
+
void convr1dcircular(/* Real */ const ae_vector* s,
|
923
|
+
ae_int_t m,
|
924
|
+
/* Real */ const ae_vector* r,
|
925
|
+
ae_int_t n,
|
926
|
+
/* Real */ ae_vector* c,
|
927
|
+
ae_state *_state);
|
928
|
+
void convr1dcircularbuf(/* Real */ const ae_vector* s,
|
929
|
+
ae_int_t m,
|
930
|
+
/* Real */ const ae_vector* r,
|
931
|
+
ae_int_t n,
|
932
|
+
/* Real */ ae_vector* c,
|
933
|
+
ae_state *_state);
|
934
|
+
void convr1dcircularinv(/* Real */ const ae_vector* a,
|
935
|
+
ae_int_t m,
|
936
|
+
/* Real */ const ae_vector* b,
|
937
|
+
ae_int_t n,
|
938
|
+
/* Real */ ae_vector* r,
|
939
|
+
ae_state *_state);
|
940
|
+
void convr1dcircularinvbuf(/* Real */ const ae_vector* a,
|
941
|
+
ae_int_t m,
|
942
|
+
/* Real */ const ae_vector* b,
|
943
|
+
ae_int_t n,
|
944
|
+
/* Real */ ae_vector* r,
|
945
|
+
ae_state *_state);
|
946
|
+
void convc1dx(/* Complex */ const ae_vector* a,
|
947
|
+
ae_int_t m,
|
948
|
+
/* Complex */ const ae_vector* b,
|
949
|
+
ae_int_t n,
|
950
|
+
ae_bool circular,
|
951
|
+
ae_int_t alg,
|
952
|
+
ae_int_t q,
|
953
|
+
/* Complex */ ae_vector* r,
|
954
|
+
ae_state *_state);
|
955
|
+
void convr1dx(/* Real */ const ae_vector* a,
|
956
|
+
ae_int_t m,
|
957
|
+
/* Real */ const ae_vector* b,
|
958
|
+
ae_int_t n,
|
959
|
+
ae_bool circular,
|
960
|
+
ae_int_t alg,
|
961
|
+
ae_int_t q,
|
962
|
+
/* Real */ ae_vector* r,
|
963
|
+
ae_state *_state);
|
964
|
+
#endif
|
965
|
+
#if defined(AE_COMPILE_CORR) || !defined(AE_PARTIAL_BUILD)
|
966
|
+
void corrc1d(/* Complex */ const ae_vector* signal,
|
967
|
+
ae_int_t n,
|
968
|
+
/* Complex */ const ae_vector* pattern,
|
969
|
+
ae_int_t m,
|
970
|
+
/* Complex */ ae_vector* r,
|
971
|
+
ae_state *_state);
|
972
|
+
void corrc1dbuf(/* Complex */ const ae_vector* signal,
|
973
|
+
ae_int_t n,
|
974
|
+
/* Complex */ const ae_vector* pattern,
|
975
|
+
ae_int_t m,
|
976
|
+
/* Complex */ ae_vector* r,
|
977
|
+
ae_state *_state);
|
978
|
+
void corrc1dcircular(/* Complex */ const ae_vector* signal,
|
979
|
+
ae_int_t m,
|
980
|
+
/* Complex */ const ae_vector* pattern,
|
981
|
+
ae_int_t n,
|
982
|
+
/* Complex */ ae_vector* c,
|
983
|
+
ae_state *_state);
|
984
|
+
void corrc1dcircularbuf(/* Complex */ const ae_vector* signal,
|
985
|
+
ae_int_t m,
|
986
|
+
/* Complex */ const ae_vector* pattern,
|
987
|
+
ae_int_t n,
|
988
|
+
/* Complex */ ae_vector* c,
|
989
|
+
ae_state *_state);
|
990
|
+
void corrr1d(/* Real */ const ae_vector* signal,
|
991
|
+
ae_int_t n,
|
992
|
+
/* Real */ const ae_vector* pattern,
|
993
|
+
ae_int_t m,
|
994
|
+
/* Real */ ae_vector* r,
|
995
|
+
ae_state *_state);
|
996
|
+
void corrr1dbuf(/* Real */ const ae_vector* signal,
|
997
|
+
ae_int_t n,
|
998
|
+
/* Real */ const ae_vector* pattern,
|
999
|
+
ae_int_t m,
|
1000
|
+
/* Real */ ae_vector* r,
|
1001
|
+
ae_state *_state);
|
1002
|
+
void corrr1dcircular(/* Real */ const ae_vector* signal,
|
1003
|
+
ae_int_t m,
|
1004
|
+
/* Real */ const ae_vector* pattern,
|
1005
|
+
ae_int_t n,
|
1006
|
+
/* Real */ ae_vector* c,
|
1007
|
+
ae_state *_state);
|
1008
|
+
void corrr1dcircularbuf(/* Real */ const ae_vector* signal,
|
1009
|
+
ae_int_t m,
|
1010
|
+
/* Real */ const ae_vector* pattern,
|
1011
|
+
ae_int_t n,
|
1012
|
+
/* Real */ ae_vector* c,
|
1013
|
+
ae_state *_state);
|
1014
|
+
#endif
|
1015
|
+
|
1016
|
+
}
|
1017
|
+
#endif
|
1018
|
+
|