9 //' @param cwt Continuous wavelets transform
11 //' @return The filtered CWT
13 NumericMatrix
epclustFilter(NumericMatrix cwt
)
17 NumericMatrix
fcwt(L
, D
); //fill with 0... TODO: back to SEXP C-style?
18 double *cwt_c
= cwt
.begin(),
19 *fcwt_c
= fcwt
.begin();
21 //TODO: coding style is terrible... no time for now.
22 for (int col
=0; col
<D
; col
++)
25 double ma
= v1
+ cwt
[1] + cwt_c
[2];
26 for (int i
=1; i
<L
-2; i
++)
29 ma
= ma
- v1
+ cwt_c
[i
+2];
33 fcwt_c
[L
-2] = ma
/ 3.;
34 fcwt_c
[L
-1] = cwt_c
[L
-1];