java.lang.Object
imagingbook.spectral.dft.Dft1dDirect
imagingbook.spectral.dft.Dft1dDirect.Float
- All Implemented Interfaces:
Dft1d
,Dft1d.Float
- Enclosing class:
- Dft1dDirect
One-dimensional DFT implementation using
float
data.-
Nested Class Summary
Nested classes/interfaces inherited from class imagingbook.spectral.dft.Dft1dDirect
Dft1dDirect.Double, Dft1dDirect.Float
Nested classes/interfaces inherited from interface imagingbook.spectral.dft.Dft1d
Dft1d.Double, Dft1d.Float
-
Constructor Summary
ConstructorsConstructorDescriptionFloat
(int M) Constructor using the default scaling mode.Float
(int M, ScalingMode sm) Constructor using a specific scaling mode. -
Method Summary
Modifier and TypeMethodDescriptionvoid
forward
(float[] gRe, float[] gIm) Performs an "in-place" DFT forward transformation on the supplied 1Dfloat
data.Returns the scaling mode of this DFT (seeScalingMode
).int
getSize()
Returns the size of this DFT (length of data vectors).void
inverse
(float[] GRe, float[] GIm) Performs an "in-place" DFT inverse transformation on the supplied 1Dfloat
spectrum.void
transform
(float[] inRe, float[] inIm, boolean forward) Transforms the given 1D arrays 'in-place'.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface imagingbook.spectral.dft.Dft1d
getScalingMode, getSize
Methods inherited from interface imagingbook.spectral.dft.Dft1d.Float
checkSize
-
Constructor Details
-
Float
Constructor using a specific scaling mode.- Parameters:
M
- the size of the data vectorssm
- the scaling mode
-
Float
Constructor using the default scaling mode.- Parameters:
M
- the size of the data vectors
-
-
Method Details
-
forward
Description copied from interface:Dft1d.Float
Performs an "in-place" DFT forward transformation on the supplied 1Dfloat
data. The input signal is replaced by the associated DFT spectrum.- Specified by:
forward
in interfaceDft1d.Float
- Parameters:
gRe
- real part of the signal (modified)gIm
- imaginary part of the signal (modified)
-
inverse
Description copied from interface:Dft1d.Float
Performs an "in-place" DFT inverse transformation on the supplied 1Dfloat
spectrum. The input spectrum is replaced by the associated signal.- Specified by:
inverse
in interfaceDft1d.Float
- Parameters:
GRe
- real part of the spectrum (modified)GIm
- imaginary part of the spectrum (modified)
-
transform
Description copied from interface:Dft1d.Float
Transforms the given 1D arrays 'in-place'. Separate arrays of identical size must be supplied for the real and imaginary parts of the signal (forward) or spectrum (inverse), neither of which may benull
.- Specified by:
transform
in interfaceDft1d.Float
- Parameters:
inRe
- real part of the input signal or spectrum (modified)inIm
- imaginary part of the input signal or spectrum (modified)forward
- forward transformation iftrue
, inverse transformation iffalse
-
getSize
public int getSize()Description copied from interface:Dft1d
Returns the size of this DFT (length of data vectors). -
getScalingMode
Description copied from interface:Dft1d
Returns the scaling mode of this DFT (seeScalingMode
).- Specified by:
getScalingMode
in interfaceDft1d
- Returns:
- the scaling mode of this DFT.
-