C09EBF (PDF version)
C09 Chapter Contents
C09 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

C09EBF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

1  Purpose

C09EBF computes the inverse two-dimensional discrete wavelet transform (DWT) at a single level. The initialization routine C09ABF must be called first to set up the DWT options.

2  Specification

SUBROUTINE C09EBF ( M, N, CA, LDCA, CH, LDCH, CV, LDCV, CD, LDCD, B, LDB, ICOMM, IFAIL)
INTEGER  M, N, LDCA, LDCH, LDCV, LDCD, LDB, ICOMM(180), IFAIL
REAL (KIND=nag_wp)  CA(LDCA,*), CH(LDCH,*), CV(LDCV,*), CD(LDCD,*), B(LDB,N)

3  Description

C09EBF performs the inverse operation of routine C09EAF. That is, given sets of approximation, horizontal, vertical and diagonal coefficients computed by routine C09EAF using a DWT as set up by the initialization routine C09ABF, on a real matrix, B, C09EBF will reconstruct B.

4  References

None.

5  Parameters

1:     M – INTEGERInput
On entry: number of rows, m, of data matrix B.
Constraint: this must be the same as the value M passed to the initialization routine C09ABF.
2:     N – INTEGERInput
On entry: number of columns, n, of data matrix B.
Constraint: this must be the same as the value N passed to the initialization routine C09ABF.
3:     CA(LDCA,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array CA must be at least ncn where ncn is the parameter NWCN returned by routine C09ABF.
On entry: contains the ncm by ncn matrix of approximation coefficients, Ca. This array will normally be the result of some transformation on the coefficients computed by routine C09EAF.
4:     LDCA – INTEGERInput
On entry: the first dimension of the array CA as declared in the (sub)program from which C09EBF is called.
Constraint: LDCAncm where ncm=nct/4ncn and ncn, nct are returned by the initialization routine C09ABF.
5:     CH(LDCH,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array CH must be at least ncn where ncn is the parameter NWCN returned by routine C09ABF.
On entry: contains the ncm by ncn matrix of horizontal coefficients, Ch. This array will normally be the result of some transformation on the coefficients computed by routine C09EAF.
6:     LDCH – INTEGERInput
On entry: the first dimension of the array CH as declared in the (sub)program from which C09EBF is called.
Constraint: LDCHncm where ncm=nct/4ncn and ncn, nct are returned by the initialization routine C09ABF.
7:     CV(LDCV,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array CV must be at least ncn where ncn is the parameter NWCN returned by routine C09ABF.
On entry: contains the ncm by ncn matrix of vertical coefficients, Cv. This array will normally be the result of some transformation on the coefficients computed by routine C09EAF.
8:     LDCV – INTEGERInput
On entry: the first dimension of the array CV as declared in the (sub)program from which C09EBF is called.
Constraint: LDCVncm where ncm=nct/4ncn and ncn, nct are returned by the initialization routine C09ABF.
9:     CD(LDCD,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array CD must be at least ncn where ncn is the parameter NWCN returned by routine C09ABF.
On entry: contains the ncm by ncn matrix of diagonal coefficients, Cd. This array will normally be the result of some transformation on the coefficients computed by routine C09EAF.
10:   LDCD – INTEGERInput
On entry: the first dimension of the array CD as declared in the (sub)program from which C09EBF is called.
Constraint: LDCDncm where ncm=nct/4ncn and ncn, nct are returned by the initialization routine C09ABF.
11:   B(LDB,N) – REAL (KIND=nag_wp) arrayOutput
On exit: the m by n reconstructed matrix, B, based on the input approximation, horizontal, vertical and diagonal coefficients and the transform options supplied to the initialization routine C09ABF.
12:   LDB – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which C09EBF is called.
Constraint: LDBM.
13:   ICOMM(180) – INTEGER arrayCommunication Array
On entry: contains details of the discrete wavelet transform and the problem dimension as setup in the call to the initialization routine C09ABF.
14:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ or ​1. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. When the value -1​ or ​1 is used it is essential to test the value of IFAIL on exit.
On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
IFAIL=1
On entry,LDCA<ncm, where ncm=nct/4ncn and nct, ncn are returned by the initialization routine C09ABF,
orLDCH<ncm,
orLDCV<ncm,
orLDCD<ncm.
IFAIL=2
On entry, LDB<M.
IFAIL=4
On entry,M is inconsistent with the value passed to the initialization routine C09ABF,
orN is inconsistent with the value passed to the initialization routine C09ABF.
IFAIL=6
On entry, the initialization routine C09ACF has not been called first or it has been called with WTRANS='M', or the communication array ICOMM has become corrupted.

7  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.

8  Further Comments

None.

9  Example

See Section 9 in C09EAF.

C09EBF (PDF version)
C09 Chapter Contents
C09 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012