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).
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long | serialVersionUID
Serializable version identifier. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected double[] | Returns: the real transformed array,ythe real data array to be transformed x)The FHT (Fast Hadamard Transformation) which uses only subtraction and addition. |
| protected int[] | Returns: the integer transformed array,ythe integer data array to be transformed x)Returns the forward transform of the specified integer data set. |
| public double[] | transform(final double[]
the real data array to be transformed (signal) f, final TransformType the type of transform (forward, inverse) to be performed type)Implements org. Returns the (forward, inverse) transform of the specified real data set. |
| public double[] | transform(final UnivariateFunction
the function to be sampled and transformed f, final double the (inclusive) lower bound for the interval min, final double the (exclusive) upper bound for the interval max, final int the number of sample points n, final TransformType the type of transform (forward, inverse) to be performed type)Implements org. Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval. |
| public int[] | Returns: the integer transformed array (spectrum)the integer data array to be transformed (signal) 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. |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID Serializable version identifier. | |
| FastHadamardTransformer | back to summary |
|---|---|
| public FastHadamardTransformer() | |
| fht | back to summary | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| protected double[] fht(double[] x) throws MathIllegalArgumentException The FHT (Fast Hadamard Transformation) which uses only subtraction and
addition. Requires Short Table of manual calculation for N=8
How it works
Visually
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fht | back to summary |
|---|---|
| protected int[] fht(int[] x) throws MathIllegalArgumentException Returns the forward transform of the specified integer data set. The FHT (Fast Hadamard Transform) uses only subtraction and addition.
| |
| transform | back to summary |
|---|---|
| public double[] transform(final double[] f, final TransformType type) Implements org. Doc from org. Returns the (forward, inverse) transform of the specified real data set.
| |
| transform | back to summary |
|---|---|
| public double[] transform(final UnivariateFunction f, final double min, final double max, final int n, final TransformType type) Implements org. Doc from org. Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval.
| |
| transform | back to summary |
|---|---|
| public int[] transform(final 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.
| |