Top Description Methods
org.apache.commons.math3.transform

public Interface RealTransformer

Known Direct Implementers
org.apache.commons.math3.transform.FastCosineTransformer, org.apache.commons.math3.transform.FastHadamardTransformer, org.apache.commons.math3.transform.FastSineTransformer
Imports
org.apache.commons.math3.analysis.UnivariateFunction, org.apache.commons.math3.exception.MathIllegalArgumentException, .NonMonotonicSequenceException, .NotStrictlyPositiveException

Interface for one-dimensional data sets transformations producing real results.

Such transforms include sine transform, cosine transform or Hadamard transform. Fourier transform is of a different kind and does not implement this interface since it produces org.apache.commons.math3.complex.Complex results instead of real ones.

Since
2.0

Method Summary

Modifier and TypeMethod and Description
public double[]

Returns:

the real transformed array (spectrum)
transform
(double[]
the real data array to be transformed (signal)
f
,
TransformType
the type of transform (forward, inverse) to be performed
type
)

Returns the (forward, inverse) transform of the specified real data set.

public double[]

Returns:

the real transformed array
transform
(UnivariateFunction
the function to be sampled and transformed
f
,
double
the (inclusive) lower bound for the interval
min
,
double
the (exclusive) upper bound for the interval
max
,
int
the number of sample points
n
,
TransformType
the type of transform (forward, inverse) to be performed
type
)

Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval.

Method Detail

transformback to summary
public double[] transform(double[] f, TransformType type) throws MathIllegalArgumentException

Returns the (forward, inverse) transform of the specified real data set.

Parameters
f:double[]

the real data array to be transformed (signal)

type:TransformType

the type of transform (forward, inverse) to be performed

Returns:double[]

the real transformed array (spectrum)

Exceptions
MathIllegalArgumentException:
if the array cannot be transformed with the given type (this may be for example due to array size, which is constrained in some transforms)
transformback to summary
public double[] transform(UnivariateFunction f, double min, double max, int n, TransformType type) throws NonMonotonicSequenceException, NotStrictlyPositiveException, MathIllegalArgumentException

Returns the (forward, inverse) transform of the specified real function, sampled on the specified interval.

Parameters
f:UnivariateFunction

the function to be sampled and transformed

min:double

the (inclusive) lower bound for the interval

max:double

the (exclusive) upper bound for the interval

n:int

the number of sample points

type:TransformType

the type of transform (forward, inverse) to be performed

Returns:double[]

the real transformed array

Exceptions
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 sample cannot be transformed with the given type (this may be for example due to sample size, which is constrained in some transforms)