Enum Apodization

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Apodization>

    public enum Apodization
    extends java.lang.Enum<Apodization>
    implementation of frequenty used apodization (aka. windowing) functions reference: http://en.wikipedia.org/wiki/Apodization_function - feel free to populate this with the other (however also less frequently used) windows
    Author:
    rstein
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void apodize​(double[] data, Apodization function)  
      double getIndex​(int i, int n)
      computes and returns the value of the apodization function for a given window index
      double getIndex​(int i, int n, double m)
      computes and returns the value of the apodization function for a given window index
      java.lang.String getName()  
      static void main​(java.lang.String[] argv)  
      static Apodization valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Apodization[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static Apodization[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Apodization c : Apodization.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Apodization valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getIndex

        public double getIndex​(int i,
                               int n)
        computes and returns the value of the apodization function for a given window index
        Parameters:
        i - index within window
        n - length of window @return, the apodization value
        Returns:
        value of the apodization function
      • getIndex

        public double getIndex​(int i,
                               int n,
                               double m)
        computes and returns the value of the apodization function for a given window index
        Parameters:
        i - index within window
        n - length of window
        m - additional window (typ. bandwidth, power, etc) @return, the apodization value
        Returns:
        value of the apodization function
      • getName

        public java.lang.String getName()
      • apodize

        public static void apodize​(double[] data,
                                   Apodization function)
      • main

        public static void main​(java.lang.String[] argv)