public class FastHadamardTransformer extends Object implements RealTransformer, Serializable
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[] |
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.
|
public double[] transform(double[] f, TransformType type)
transform
in interface RealTransformer
f
- the real data array to be transformed (signal)type
- the type of transform (forward, inverse) to be performedMathIllegalArgumentException
- if the length of the data array is
not a power of twopublic double[] transform(UnivariateFunction f, double min, double max, int n, TransformType type)
transform
in interface RealTransformer
f
- the function to be sampled and transformedmin
- the (inclusive) lower bound for the intervalmax
- the (exclusive) upper bound for the intervaln
- the number of sample pointstype
- the type of transform (forward, inverse) to be performedNonMonotonicSequenceException
- if the lower bound is greater than, or equal to the upper boundNotStrictlyPositiveException
- if the number of sample points is negativeMathIllegalArgumentException
- if the number of sample points is not a power of twopublic int[] transform(int[] f)
f
- the integer data array to be transformed (signal)MathIllegalArgumentException
- if the length of the data array is not a power of twoJas4pp 1.5 © Java Analysis Studio for Particle Physics