Class FastHadamardTransform

    • Constructor Detail

      • FastHadamardTransform

        public FastHadamardTransform​(boolean inverse)
        Parameters:
        inverse - Whether to perform the inverse transform.
    • Method Detail

      • apply

        public double[] apply​(double[] f)
        Returns the transform of the specified data set.
        Specified by:
        apply in interface Function<double[],​double[]>
        Specified by:
        apply in interface RealTransform
        Parameters:
        f - the data array to be transformed (signal).
        Returns:
        the transformed array (spectrum).
        Throws:
        IllegalArgumentException - if the length of the data array is not a power of two.
      • apply

        public int[] apply​(int[] f)
        Returns the forward transform of the given data set. The integer transform cannot be inverted directly, due to a scaling factor which may lead to double results.
        Parameters:
        f - Data array to be transformed (signal).
        Returns:
        the transformed array (spectrum).
        Throws:
        IllegalArgumentException - if the length of the data array is not a power of two.