c09cd computes the inverse one-dimensional multi-level discrete wavelet transform (DWT). This method reconstructs data from (possibly filtered or otherwise manipulated) wavelet transform coefficients calculated by c09cc from an original set of data. The initialization method C09 Communication class constructor must be called first to set up the DWT options.

Syntax

C#
public static void c09cd(
	int nwlinv,
	double[] c,
	int n,
	double[] y,
	C09..::..C09Communications communications,
	out int ifail
)
Visual Basic
Public Shared Sub c09cd ( _
	nwlinv As Integer, _
	c As Double(), _
	n As Integer, _
	y As Double(), _
	communications As C09..::..C09Communications, _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void c09cd(
	int nwlinv, 
	array<double>^ c, 
	int n, 
	array<double>^ y, 
	C09..::..C09Communications^ communications, 
	[OutAttribute] int% ifail
)
F#
static member c09cd : 
        nwlinv : int * 
        c : float[] * 
        n : int * 
        y : float[] * 
        communications : C09..::..C09Communications * 
        ifail : int byref -> unit 

Parameters

nwlinv
Type: System..::..Int32
On entry: the number of levels to be used in the inverse multi-level transform. The number of levels must be less than or equal to nfwd, which has the value of parameter nwl as used in the computation of the wavelet coefficients using c09cc. The data will be reconstructed to level nwl-nwlinv, where level 0 is the original input dataset provided to c09cc.
Constraint: 1nwlinvnwl, where nwl is the value used in a preceding call to c09cc.
c
Type: array<System..::..Double>[]()[][]
An array of size [lenc]
On entry: the coefficients of a multi-level wavelet transform of the dataset.
Let qi be the number of coefficients (of each type) at level i, for i=nfwd,nfwd-1,,1. Then, setting k1=qnfwd and kj+1=kj+qnfwd-j+1, for j=1,2,,nfwd, the coefficients are stored in c as follows:
c[i-1], for i=1,2,,k1
Contains the level nfwd approximation coefficients, anfwd.
c[i-1], for i=k1+1,,k2
Contains the level nfwd detail coefficients dnfwd.
c[i-1], for i=kj+1,,kj+1
Contains the level nfwd-j+1 detail coefficients, for j=2,3,,nfwd.
The values qi, for i=nfwd,nfwd-1,,1, are contained in dwtlev which is produced as output by a preceding call to c09cc. See c09cc for details.
n
Type: System..::..Int32
On entry: n, the length of the data array, y, to be reconstructed. For a full reconstruction of nwl levels, where nwl is as supplied to c09cc, this must be the same as parameter n used in the call to c09cc. For a partial reconstruction of nwlinv<nwl, this must be equal to dwtlev[nwlinv+1], as returned from c09cc.
y
Type: array<System..::..Double>[]()[][]
An array of size [n]
On exit: the dataset reconstructed from the multi-level wavelet transform coefficients and the transformation options supplied to the initialization method c09aa.
communications
Type: NagLibrary..::..C09..::..C09Communications
An Object of type C09.c09cdCommunications.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

Description

c09cd performs the inverse operation of c09cc. That is, given a set of wavelet coefficients, computed up to level nfwd by c09cc using a DWT as set up by the initialization method C09 Communication class constructor, on a real data array of length n, c09cd will reconstruct the data array yi, for i=1,2,,n, from which the coefficients were derived. If the original input dataset is level 0, then it is possible to terminate reconstruction at a higher level by specifying fewer than the number of levels used in the call to c09cc. This results in a partial reconstruction.

References

None.

Error Indicators and Warnings

Errors or warnings detected by the method:
ifail=1
On entry, nwlinv=value.
Constraint: nwlinv1.
On entry, nwlinv is larger than the number of levels computed by the preceding call to c09cc: nwlinv=value, expected =value.
ifail=2
On entry, lenc is set too small: lenc=value.
Constraint: lencvalue.
ifail=4
On entry, n is inconsistent with the value passed to the initialization method: n=value, n should be value.
ifail=6
Either the initialization method has not been called first or array icomm has been corrupted.
Either the initialization method was called with wtrans="S" or array icomm has been corrupted.
ifail=-999
Dynamic memory allocation failed.
ifail=-9000
An error occured, see message report.
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value

Accuracy

The accuracy of the wavelet transform depends only on the floating-point operations used in the convolution and downsampling and should thus be close to machine precision.

Parallelism and Performance

None.

Further Comments

None.

Example

See Also