Documentation of 'org.apache.commons.math3.transform.FastHadamardTransformer' Java class
FastHadamardTransformer
org.apache.commons.math3.transform

Class FastHadamardTransformer

  • All Implemented Interfaces:
    java.io.Serializable, RealTransformer


    public class FastHadamardTransformer
    extends java.lang.Object
    implements RealTransformer, java.io.Serializable
    Implements the Fast Hadamard Transform (FHT). Transformation of an input vector x to the output vector y.

    In addition to transformation of real vectors, the Hadamard transform can transform integer vectors into integer vectors. However, this integer transform cannot be inverted directly. Due to a scaling factor it may lead to rational results. As an example, the inverse transform of integer vector (0, 1, 0, 1) is rational vector (1/2, -1/2, 0, 0).

    Since:
    2.0
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double[] transform(double[] f, TransformType type)
      Returns the (forward, inverse) transform of the specified real data set.
      int[] transform(int[] f)
      Returns the forward transform of the specified integer data set.The integer transform cannot be inverted directly, due to a scaling factor which may lead to double results.
      double[] transform(UnivariateFunction f, double min, double max, int n, TransformType type)
      Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FastHadamardTransformer

        public FastHadamardTransformer()
    • Method Detail

      • transform

        public double[] transform(double[] f,
                                  TransformType type)
        Returns the (forward, inverse) transform of the specified real data set.
        Specified by:
        transform in interface RealTransformer
        Parameters:
        f - the real data array to be transformed (signal)
        type - the type of transform (forward, inverse) to be performed
        Returns:
        the real transformed array (spectrum)
        Throws:
        MathIllegalArgumentException - if the length of the data array is not a power of two
      • transform

        public double[] transform(UnivariateFunction f,
                                  double min,
                                  double max,
                                  int n,
                                  TransformType type)
        Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval.
        Specified by:
        transform in interface RealTransformer
        Parameters:
        f - the function to be sampled and transformed
        min - the (inclusive) lower bound for the interval
        max - the (exclusive) upper bound for the interval
        n - the number of sample points
        type - the type of transform (forward, inverse) to be performed
        Returns:
        the real transformed array
        Throws:
        NonMonotonicSequenceException - if the lower bound is greater than, or equal to the upper bound
        NotStrictlyPositiveException - if the number of sample points is negative
        MathIllegalArgumentException - if the number of sample points is not a power of two
      • transform

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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.