FFTInterface Class Reference

#include <fft.h>

Inheritance diagram for FFTInterface:

Public Member Functions

MAXON_METHOD Result< void > Transform1D (const ArrayInterface< Generic > &in, WritableArrayInterface< Generic > &out, FFT_FLAGS fftFlags=FFT_FLAGS::NONE) const
 
MAXON_METHOD Result< void > Transform2D (const ConstMatrixNxMInterface &in, const MatrixNxMInterface &out, FFT_FLAGS fftFlags=FFT_FLAGS::NONE) const
 
MAXON_METHOD FFT_SUPPORT GetSupportOptions () const
 

Private Member Functions

 MAXON_INTERFACE (FFTInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.fft")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( FFTInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interface.fft"   
)
private

◆ Transform1D()

MAXON_METHOD Result<void> Transform1D ( const ArrayInterface< Generic > &  in,
WritableArrayInterface< Generic > &  out,
FFT_FLAGS  fftFlags = FFT_FLAGS::NONE 
) const

Computes a one-dimensional FFT transformation Note: The count of the input array can be an arbitrary number. The size of the output array is automatically adjusted if necessary and might be greater than the input array due to padding (some implementations get a speedup factor of 1000x and more from this) Note 1: padding changes the output array count and fills the remaning array entries with zeros. This leads to a slightly different output since padding with zeros in the time domain effectively means interpolating in the frequency domain. For some critical applications it might be advisable to leave the original array size intact and hence set the SUPPRESS_PADDING option (works only if the implementation supports no padding) Note 2: Usually FFT conversion means using an input array of complex data and get a transformed output array of complex data too. On the other hand for many applications the input data (time domain) is pure real data without any imaginary (phase) data. The interface automatically acounts for this and allows the user to either input complex or pure float arrays alternatively. Same goes for the output array. But please note even if it is possible to use float arrays both as input and output array this is not advisable since you loose vital phase information for inverse transformation. Only if you dont rely on any phase information and you dont plan on inverting the data this combination might be useful. At the moment the implementation supports the types Float32, Float64, Complex32 and Complex64. Check for FFT_SUPPORT::TRANSFORM_1D if component supports this function

◆ Transform2D()

MAXON_METHOD Result<void> Transform2D ( const ConstMatrixNxMInterface in,
const MatrixNxMInterface out,
FFT_FLAGS  fftFlags = FFT_FLAGS::NONE 
) const

Computes a two-dimensional FFT transformation Note: The count of the input array can be an arbitrary number. The size of the output array is automatically adjusted if necessary and might be greater than the input array due to padding (some implementations get a speedup factor of 1000x and more from this) Note 1: padding changes the output array count and fills the remaning array entries with zeros. This leads to a slightly different output since padding with zeros in the time domain effectively means interpolating in the frequency domain. For some critical applications it might be advisable to leave the original array size intact and hence set the SUPPRESS_PADDING option (works only if the implementation supports no padding) Note 2: Usually FFT conversion means using an input array of complex data and get a transformed output array of complex data too. On the other hand for many applications the input data (time domain) is pure real data without any imaginary (phase) data. The interface automatically acounts for this and allows the user to either input complex or pure float arrays alternatively. Same goes for the output array. But please note even if it is possible to use float arrays both as input and output array this is not advisable since you loose vital phase information for inverse transformation. Only if you dont rely on any phase information and you dont plan on inverting the data this combination might be useful. At the moment the implementation supports the types Float32, Float64, Complex32 and Complex64 Check for FFT_SUPPORT::TRANSFORM_2D if component supports this function

◆ GetSupportOptions()

MAXON_METHOD FFT_SUPPORT GetSupportOptions ( ) const

Returns the supported flags.