Exemple #1
0
// [[Rcpp::export]]
List FFT_realim(NumericVector real,bool inverse=false,int nb_threads=0) {
  CImg<double> rl = as<CImg<double> >(real);
  CImg<double> im(rl,"xyzc",0);
  rl.FFT(rl,im,inverse,nb_threads);
  return List::create(_["real"] = wrap(rl),_["imag"] = wrap(im));
}
Exemple #2
0
// [[Rcpp::export]]
NumericVector FFT_realout(NumericVector real,NumericVector imag,bool inverse=false,int nb_threads=0) {
  CImg<double> rl = as<CImg<double> >(real);
  CImg<double> img = as<CImg<double> >(imag);
  rl.FFT(rl,img,inverse,nb_threads);
  return wrap(rl);
}
Exemple #3
0
// [[Rcpp::export]]
List FFT_complex(NumericVector real,NumericVector imag,bool inverse=false,int nb_threads=0) {
  CImg<double> rl = as<CImg<double> >(real);
  CImg<double> img = as<CImg<double> >(imag);
  rl.FFT(rl,img,inverse,nb_threads);
  return List::create(_["real"] = wrap(rl),_["imag"] = wrap(img));
}