public class Wavelets extends Object
Modifier and Type  Field and Description 

static double 
ACCURACY
Standard accuracy of computations of wavelet values.

static long 
accuracyBitMask
The bitmask which corresponds to the accuracy bits.

static int 
accuracyBits
Number of the stored highervalued (leftmost) bits of the mantissa of a double value.

static double[][] 
h
Daubechies filter coefficients _{N}h_{k} = h[N1][k]
for the D2N wavelet, N = 1, 2, ..., 10, i.e., D2, D4, ..., D20.

static double[][] 
initialValues
Initial values phi(j) of the Daubechies scaling functions phi=phi_{N}
for the D2  D20 wavelets in dimension n=1.

Modifier and Type  Method and Description 

static String 
checkH()
This routine checks the conditions the Daubechies coefficients have to satisfy.

static double[] 
inverseTransform(int N,
double[][] w)
Computes the inverse fast Daubechies wavelet transform of a twodimensional array
w containing
a vector w[0] of the Daubechies DN wavelet coefficients, and an array
w[1] containing the scaling function coefficient. 
static double 
phi(int N,
double x)
returns the value of the scaling function _{N}φ(x) of the
Daubechies wavelet DN, where N = 2, 4, ..., 20.

static double 
psi(int N,
double x)
returns the function value of the Daubechies wavelet _{N}ψ(x)
of the Daubechies class DN, where N = 2, 4, ..., 20.

static String 
showDaubCoefficients(String format)
Returns a structured string representation of the normalized Daubechies
filter coefficients
h , in the specified format. 
static String 
showWaveletCoefficients(double[][] w)
Returns a structured string representation of the wavelet coefficients
given by the array w.

static double[][] 
transform(int N,
double[] a)
Computes the fast Daubechies wavelet transform of a data vector,
applying the Daubechies DN wavelet; the returned twodimensional array
contains the wavelet coefficients in its [0]component, and the scaling function
coefficient in its [1]component; N has to be an even number with
2 ≤ N ≤ 20.

public static final int accuracyBits
accuracyBitMask
,
Constant Field Valuespublic static final long accuracyBitMask
0xfffffffffffffL << (52  accuracyBits)
,
since the mantissa of a double value consists of 52 bits.accuracyBits
,
Constant Field Valuespublic static final double ACCURACY
public static final double[][] h
public static final double[][] initialValues
public static double phi(int N, double x)
N
 the index of the Daubechies wavelet class D2 ... D20,x
 the value for which the scaling function value is computedaccuracyBits
,
accuracyBitMask
,
initialValues
,
psi(int,double)
public static double psi(int N, double x)
N
 the index of the Daubechies wavelet class D2 ... D20,x
 the value for which the wavelet value is computedphi(int,double)
public static double[][] transform(int N, double[] a)
The principle of the Daubechies wavelet transform is as follows. Initially, the data points a[0], ..., a[2^{n}  1] are identified as the coefficients of the Daubechies scaling function (or "father wavelet"). They determine recursively the wavelet coefficients c[k] according to the scheme
c_{0}[k] = 


a_{0}[k] = 


⇒ c_{1}[k] = 


a_{1}[k] = 


⇒ c_{2}[k] = 


a_{2}[k] = 


⇒  . . .  
⇒ c_{n}[k] = 


a_{n}[k] = 

N
 the index of the applied Daubechie wavelet (N = 2, 4, ..., 20)a
 the data to be transformedinverseTransform(int,double[][])
public static double[] inverseTransform(int N, double[][] w)
w
containing
a vector w[0]
of the Daubechies DN wavelet coefficients, and an array
w[1]
containing the scaling function coefficient.
There are the following three mandatory restrictions for the parameters,
due to the wavelet transform algorithm as performed by
transform
method:
w[0].length
of wavelet coefficients must satisfy
w[0].length
= 2^{n}1 for an integer n.
w[1].length
of scaling function coefficients must be 1.
N
 the index of the applied Daubechie wavelet (N = 2, 4, ..., 20)w
 the wavelet coefficients w[0]
and scaling function coefficients
w[1]
to be transformedtransform(int,double[])
public static String checkH()
 sumEven = sum_k^{N1} h_{2k} = 1/sqrt(2);  sumOdd = sum_k^{N1} h_{2k+1} = 1/sqrt(2);  For each integer m = 0, 1, ..., N1: sum_{k=2m}^{2N1+2m} h_{k} h_{k2m} = 1 if m=0, = 0 otherwise.See http://mathit.org/Publikationen/Wavelets.pdf for details.
public static String showWaveletCoefficients(double[][] w)
w
 array of wavelet coefficientspublic static String showDaubCoefficients(String format)
h
, in the specified format.
The format can be one of the following string values:
"LaTeX"
for LaTeX format"Mathematica"
for Mathematica input format"Java (rescaled)"
for a Java formatted output of
the filter coefficients times √2
format
 format of the string to be returned. E.g., "LaTeX", "Mathematica", or "Java (rescaled)"