1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <math.h>
#include <stddef.h>
#include "ts.h"
bool ts_test_elder_impulse( void )
{
/* k=3, offset=5 */
fp_t const x[] = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
fp_t const * const inp[1] = { x };
/* k=3, offset=4, y_n=6 */
/* SMA(3): 11, 12, 13, 14, 15, 16, 17, 18 */
/* Osc: 1, 1, 1, 1, 1, 1, 1, 1 */
/* Signal (offset=4, 6 values): 1, 1, 1, 1, 1, 1 */
fp_t const eos[] = { 1, 1, 1, 1, 1, 1 };
fp_t const es[] = { 1, 1, 1, 1, 1, 1 };
fp_t const * const exp[2] = { eos, es };
uint_t k = 3;
return ts_test(ts_elder_impulse, ts_elder_impulse_offset, inp, exp, sizeof( x ) / sizeof( *x ), (ts_constant_t *)&k, &ts_elder_impulse_p);
}
|