#include using namespace Rcpp; //' filter //' //' Filter time-series //' //' @param cwt Continuous wavelets transform //' //' @return The filtered CWT // [[Rcpp::export]] NumericMatrix epclustFilter(NumericMatrix cwt) { int L = cwt.nrow(), D = cwt.ncol(); NumericMatrix fcwt(L, D); //fill with 0... TODO: back to SEXP C-style? double *cwt_c = cwt.begin(), *fcwt_c = fcwt.begin(); //TODO: coding style is terrible... no time for now. for (int col=0; col