58 [&](
auto& resultElement)
60 const auto i = &resultElement - result.data();
61 const auto k = static_cast<double>(i / shape.cols);
62 const auto l = static_cast<double>(i % shape.cols);
63 resultElement = std::complex<double>{ 0., 0. };
70 (((
static_cast<double>(m) * k) /
static_cast<double>(
shape.
rows)) +
71 ((
static_cast<double>(n) * l) /
static_cast<double>(
shape.
cols)));
92 template<
typename dtype>
97 const auto data = nc::complex<dtype, double>(inArray);
111 template<
typename dtype>
130 template<
typename dtype>
135 const auto data = nc::complex<dtype, double>(inArray);
149 template<
typename dtype>
154 return fft2(inArray, inArray.shape());
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:139
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4591
A Shape Class for NdArrays.
Definition: Core/shape.hpp:41
uint32 rows
Definition: Core/shape.hpp:44
uint32 cols
Definition: Core/shape.hpp:45
constexpr double twoPi
2Pi
Definition: Core/Constants.hpp:40
NdArray< std::complex< double > > fft2_internal(const NdArray< std::complex< double > > &x, const Shape &shape)
Definition: fft2.hpp:47
Definition: FFT/fft.hpp:40
NdArray< std::complex< double > > fft2(const NdArray< std::complex< dtype > > &inArray)
Definition: fft2.hpp:150
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:226
NdArray< dtype > min(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition: min.hpp:44
auto angle(const std::complex< dtype > &inValue)
Definition: angle.hpp:48
auto polar(dtype magnitude, dtype phaseAngle)
Definition: polar.hpp:49
Shape shape(const NdArray< dtype > &inArray) noexcept
Definition: Functions/shape.hpp:42