public class FastHadamardTransformer extends java.lang.Object implements RealTransformer
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).
Constructor and Description |
---|
FastHadamardTransformer() |
Modifier and Type | Method and Description |
---|---|
double[] |
inversetransform(double[] f)
Inversely transform the given real data set.
|
double[] |
inversetransform(UnivariateRealFunction f,
double min,
double max,
int n)
Inversely transform the given real function, sampled on the given interval.
|
double[] |
transform(double[] f)
Transform the given real data set.
|
int[] |
transform(int[] f)
Transform the given real data set.
|
double[] |
transform(UnivariateRealFunction f,
double min,
double max,
int n)
Transform the given real function, sampled on the given interval.
|
public double[] transform(double[] f) throws java.lang.IllegalArgumentException
transform
in interface RealTransformer
f
- the real data array to be transformed (signal)java.lang.IllegalArgumentException
- if any parameters are invalidpublic double[] transform(UnivariateRealFunction f, double min, double max, int n) throws FunctionEvaluationException, java.lang.IllegalArgumentException
transform
in interface RealTransformer
f
- the function to be sampled and transformedmin
- the lower bound for the intervalmax
- the upper bound for the intervaln
- the number of sample pointsFunctionEvaluationException
- if function cannot be evaluated at some pointjava.lang.IllegalArgumentException
- if any parameters are invalidpublic double[] inversetransform(double[] f) throws java.lang.IllegalArgumentException
inversetransform
in interface RealTransformer
f
- the real data array to be inversely transformed (spectrum)java.lang.IllegalArgumentException
- if any parameters are invalidpublic double[] inversetransform(UnivariateRealFunction f, double min, double max, int n) throws FunctionEvaluationException, java.lang.IllegalArgumentException
inversetransform
in interface RealTransformer
f
- the function to be sampled and inversely transformedmin
- the lower bound for the intervalmax
- the upper bound for the intervaln
- the number of sample pointsFunctionEvaluationException
- if function cannot be evaluated at some pointjava.lang.IllegalArgumentException
- if any parameters are invalidpublic int[] transform(int[] f) throws java.lang.IllegalArgumentException
The integer transform cannot be inverted directly, due to a scaling factor it may lead to double results.
f
- the integer data array to be transformed (signal)java.lang.IllegalArgumentException
- if any parameters are invalidCopyright © 2010 - 2020 Adobe. All Rights Reserved