Class Dft1dDirect.Double

java.lang.Object
imagingbook.spectral.dft.Dft1dDirect
imagingbook.spectral.dft.Dft1dDirect.Double
All Implemented Interfaces:
Dft1d, Dft1d.Double
Enclosing class:
Dft1dDirect

public static class Dft1dDirect.Double extends Dft1dDirect implements Dft1d.Double
One-dimensional DFT implementation using double data.
  • Constructor Details

    • Double

      public Double(int M, ScalingMode sm)
      Constructor using a specific scaling mode.
      Parameters:
      M - the size of the data vectors
      sm - the scaling mode
    • Double

      public Double(int M)
      Constructor using the default scaling mode.
      Parameters:
      M - the size of the data vectors
  • Method Details

    • forward

      public void forward(double[] gRe, double[] gIm)
      Description copied from interface: Dft1d.Double
      Performs an "in-place" 1D DFT forward transformation on the supplied double data. The input signal is replaced by the associated DFT spectrum.
      Specified by:
      forward in interface Dft1d.Double
      Parameters:
      gRe - real part of the signal (modified)
      gIm - imaginary part of the signal (modified)
    • inverse

      public void inverse(double[] GRe, double[] GIm)
      Description copied from interface: Dft1d.Double
      Performs an "in-place" 1D DFT inverse transformation on the supplied double spectrum. The input spectrum is replaced by the associated signal.
      Specified by:
      inverse in interface Dft1d.Double
      Parameters:
      GRe - real part of the spectrum (modified)
      GIm - imaginary part of the spectrum (modified)
    • transform

      public void transform(double[] inRe, double[] inIm, boolean forward)
      Description copied from interface: Dft1d.Double
      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 be null.
      Specified by:
      transform in interface Dft1d.Double
      Parameters:
      inRe - real part of the input signal or spectrum (modified)
      inIm - imaginary part of the input signal or spectrum (modified)
      forward - forward transformation if true, inverse transformation if false
    • getSize

      public int getSize()
      Description copied from interface: Dft1d
      Returns the size of this DFT (length of data vectors).
      Specified by:
      getSize in interface Dft1d
      Returns:
      the size of this DFT
    • getScalingMode

      public ScalingMode getScalingMode()
      Description copied from interface: Dft1d
      Returns the scaling mode of this DFT (see ScalingMode).
      Specified by:
      getScalingMode in interface Dft1d
      Returns:
      the scaling mode of this DFT.