216template <
typename TSpace,
typename T>
227 using Point =
typename Space::Point;
231 using Self = RealFFT< Domain, T >;
233 using SpatialImage = ArrayImageAdapter< Real*, Domain >;
235 using FreqImage = ArrayImageAdapter< Complex*, Domain >;
236 using ConstFreqImage = ArrayImageAdapter< const Complex*, Domain >;
238 static const constexpr Dimension dimension = Domain::dimension;
252 RealFFT(
Domain const& aDomain );
266 RealFFT(
Self const & ) =
delete;
275 Self & operator= (
Self && ) =
delete;
294 std::size_t getPadding() const noexcept;
305 Real* getSpatialStorage() noexcept;
307 const
Real* getSpatialStorage() const noexcept;
330 Domain const& getSpatialDomain() const noexcept;
333 Point const& getSpatialExtent() const noexcept;
348 Complex* getFreqStorage() noexcept;
350 const
Complex* getFreqStorage() const noexcept;
381 Domain const& getFreqDomain() const noexcept;
388 Point const& getFreqExtent() const noexcept;
414 void createPlan(
unsigned flags,
int way );
442 void doFFT(
unsigned flags = FFTW_ESTIMATE,
int way = FFTW_FORWARD,
bool normalized = false );
459 void forwardFFT(
unsigned flags = FFTW_ESTIMATE );
484 void backwardFFT(
unsigned flags = FFTW_ESTIMATE,
bool normalized = true );
494 RealPoint getScaledSpatialExtent() const noexcept;
499 void setScaledSpatialExtent(
RealPoint const& anExtent ) noexcept;
504 RealPoint getScaledSpatialLowerBound() const noexcept;
566 Point calcNativeSpatialCoords(
RealPoint const& aScaledPoint ) const noexcept;
583 Point calcNativeFreqCoords(
RealPoint const& aScaledPoint,
bool & applyConj ) const noexcept;
612 Real getScaledSpatialValue(
RealPoint const& aScaledPoint ) const noexcept
614 return getSpatialImage()( getNativeSpatialCoords( aScaledPoint ) );
624 void setScaledSpatialValue(
RealPoint const& aScaledPoint, Real aValue )
noexcept
626 getSpatialImage().setValue( getNativeSpatialCoords( aScaledPoint ), aValue );
640 Complex getScaledFreqValue(
RealPoint const& aScaledPoint )
const noexcept
643 const auto aPoint = calcNativeFreqCoords( aScaledPoint, apply_conj );
644 const Complex aScaledValue = calcScaledFreqValue( aScaledPoint, getFreqImage()(
aPoint ) );
645 return apply_conj ? std::conj( aScaledValue ) : aScaledValue;
656 void setScaledFreqValue(
RealPoint const& aScaledPoint, Complex aScaledValue )
noexcept
659 const auto aPoint = calcNativeFreqCoords( aScaledPoint, apply_conj );
660 const Complex aValue = calcNativeFreqValue( aScaledPoint, aScaledValue );
663 getFreqImage().setValue(
aPoint, std::conj( aValue ) );
665 getFreqImage().setValue(
aPoint, aValue );
678 bool isValid() const noexcept;
684 void selfDisplay (
std::ostream & out ) const;
697 const
Domain myFreqDomain;
698 const
Domain myFullSpatialDomain;
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
ArrayImageAdapter< const Real *, Domain > ConstSpatialImage
Constant spatial image type.
RealFFT< Domain, T > Self
Self type.
typename Space::Point Point
Point type.
typename Space::Dimension Dimension
Space dimension type.
ArrayImageAdapter< Real *, Domain > SpatialImage
Mutable spatial image type.
std::complex< Real > Complex
Complex value type.
RealFFT(Self &&)=delete
Move constructor. Deleted.
ArrayImageAdapter< const Complex *, Domain > ConstFreqImage
Constant frequency image type.
ArrayImageAdapter< Complex *, Domain > FreqImage
Mutable frequency image type.