finufft | Non-uniform fast Fourier transform library of types 1,2,3 in dimensions 1,2,3
kandi X-RAY | finufft Summary
kandi X-RAY | finufft Summary
Principal author Alex H. Barnett, main co-developers Jeremy F. Magland, Ludvig af Klinteberg, Yu-hsuan "Melody" Shih, Andrea Malleo, Libin Lu, and Joakim Andén; see docs/ackn.rst for full list of contributors. . This is a lightweight library to compute the three standard types of nonuniform FFT to a specified precision, in one, two, or three dimensions. It is written in C++ with interfaces to C, Fortran, MATLAB/octave, Python, and (in a separate repository) Julia. Please see the online documentation, or its local PDF equivalent, the user manual. You will also want to see example codes in the directories examples, test, fortran, matlab/test, and python/test. If you cannot compile, or pip install, try our precompiled binaries.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of finufft
finufft Key Features
finufft Examples and Code Snippets
Community Discussions
Trending Discussions on finufft
QUESTION
I'm trying to write an R wrapper for the FINUFFT routines for calculating the FFT of an unevenly sampled series. I have virtually no experience with C/C++, so I'm working from an example that compares the traditional Fourier transform to the NUFFT. The example code follows.
...ANSWER
Answered 2019-Jun-20 at 08:02Rcpp::as
converts from an R data type (SEXP
) to a C++ data type, e.g. Rcpp::ComplexVector
. This does not fit your situation, where you try to convert from a C-style array to C++. Fortunately Rcpp::Vector
, which is the basis for Rcpp::ComplexVector
, has a constructor for this task: Vector (InputIterator first, InputIterator last)
. For the other direction (going from C++ to C-style array) you can use vector.begin()
or &vector[0]
.
However, one needs a reinterpret_cast
to convert between Rcomplex*
and std::complex*
. That should cause no problems, though, since Rcomplex
(a.k.a. complex double
in C) and std::complex
are compatible.
A minimal example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install finufft
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page