+ SEXP fcwt_; //the filtered result
+ PROTECT(fcwt_ = Rf_allocMatrix(REALSXP, L, D));
+ double* fcwt = REAL(fcwt_); //pointer to the encapsulated vector
+
+ // NOTE: unused loop parameter: shifting at the end of the loop is more efficient
+ for (int col=D-1; col>=0; col--)