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
    10  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:     CALDCA* – 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:     CHLDCH* – 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:     CVLDCV* – 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:     CDLDCD* – 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:   BLDBN – 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:   ICOMM180 – 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=value.
Constraint: LDCAvalue, the number of wavelet coefficients in the first dimension.
On entry, LDCD=value.
Constraint: LDCDvalue, the number of wavelet coefficients in the first dimension.
On entry, LDCH=value.
Constraint: LDCHvalue, the number of wavelet coefficients in the first dimension.
On entry, LDCV=value.
Constraint: LDCVvalue, the number of wavelet coefficients in the first dimension.
IFAIL=2
On entry, LDB=value and M=value.
Constraint: LDBM.
IFAIL=4
On entry, M=value.
Constraint: M=value, the value of M on initialization (see C09ABF).
On entry, N=value.
Constraint: N=value, the value of N on initialization (see C09ABF).
IFAIL=6
Either the initialization routine has not been called first or ICOMM has been corrupted.
Either the initialization routine was called with WTRANS='M' or ICOMM has been corrupted.
IFAIL=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.8 in the Essential Introduction for further information.
IFAIL=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.7 in the Essential Introduction for further information.
IFAIL=-999
Dynamic memory allocation failed.
See Section 3.6 in the Essential Introduction for further information.

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  Parallelism and Performance

C09EBF is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9  Further Comments

None.

10  Example

See Section 10 in C09EAF.

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

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