Enum ScalingMode

java.lang.Object
java.lang.Enum<ScalingMode>
imagingbook.spectral.dft.ScalingMode
All Implemented Interfaces:
Serializable, Comparable<ScalingMode>, java.lang.constant.Constable

public enum ScalingMode extends Enum<ScalingMode>
Scaling mode used for the DFT.
  • Enum Constant Details

    • DEFAULT

      public static final ScalingMode DEFAULT
      Same scaling factor (1/sqrt(M)) is applied in forward and inverse transform.
    • FORWARD_ONLY

      public static final ScalingMode FORWARD_ONLY
      Scaling by a factor 1/M is applied to the forward transformation only.
    • INVERSE_ONLY

      public static final ScalingMode INVERSE_ONLY
      Scaling by a factor 1/M is applied to the inverse transformation only.
  • Method Details

    • values

      public static ScalingMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ScalingMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getScale

      public abstract double getScale(int M, boolean forward)
      Returns the DFT scale factor for the specified data size and transformation direction.
      Parameters:
      M - the data size
      forward - true for a forward, false for a inverse transform
      Returns:
      the scale factor