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

NAG Library Routine Document

C09FBF

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

C09FBF computes the three-dimensional inverse discrete wavelet transform (IDWT) at a single level. The initialization routine C09ACF must be called first to set up the DWT options.

2  Specification

SUBROUTINE C09FBF ( M, N, FR, LENC, C, B, LDB, SDB, ICOMM, IFAIL)
INTEGER  M, N, FR, LENC, LDB, SDB, ICOMM(260), IFAIL
REAL (KIND=nag_wp)  C(LENC), B(LDB,SDB,FR)

3  Description

C09FBF performs the inverse operation of routine C09FAF. That is, given sets of wavelet coefficients computed by routine C09FAF using a DWT as set up by the initialization routine C09ACF, on a real data array, B, C09FBF will reconstruct B.

4  References

None.

5  Parameters

1:     M – INTEGERInput
On entry: the number of rows of each two-dimensional frame.
Constraint: this must be the same as the value M passed to the initialization routine C09ACF.
2:     N – INTEGERInput
On entry: the number of columns of each two-dimensional frame.
Constraint: this must be the same as the value N passed to the initialization routine C09ACF.
3:     FR – INTEGERInput
On entry: the number two-dimensional frames.
Constraint: this must be the same as the value FR passed to the initialization routine C09ACF.
4:     LENC – INTEGERInput
On entry: the dimension of the array C as declared in the (sub)program from which C09FBF is called.
Constraint: LENCnct, where nct is the total number of wavelet coefficients, as returned by C09ACF.
5:     CLENC – REAL (KIND=nag_wp) arrayInput
On entry: the coefficients of the discrete wavelet transform. This will normally be the result of some transformation on the coefficients computed by routine C09FAF.
Note that the coefficients in C may be extracted according to type into three-dimensional arrays using C09FYF, and inserted using C09FZF.
6:     BLDBSDBFR – REAL (KIND=nag_wp) arrayOutput
On exit: the m by n by fr reconstructed array, B, with Bijk stored in Bijk. The reconstruction is based on the input wavelet coefficients and the transform options supplied to the initialization routine C09ACF.
7:     LDB – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which C09FBF is called.
Constraint: LDBM.
8:     SDB – INTEGERInput
On entry: the second dimension of the array B as declared in the (sub)program from which C09FBF is called.
Constraint: SDBN.
9:     ICOMM260 – 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 C09ACF.
10:   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, FR=value.
Constraint: FR=value, the value of FR on initialization (see C09ACF).
On entry, M=value.
Constraint: M=value, the value of M on initialization (see C09ACF).
On entry, N=value.
Constraint: N=value, the value of N on initialization (see C09ACF).
IFAIL=2
On entry, LDB=value and M=value.
Constraint: LDBM.
On entry, SDB=value and N=value.
Constraint: SDBN.
IFAIL=3
On entry, LENC=value and nct=value.
Constraint: LENCnct, where nct is the number of DWT coefficients returned by C09ACF in parameter NWCT.
IFAIL=6
Either the communication array ICOMM has been corrupted or there has not been a prior call to the initialization routine C09ACF.
The initialization routine was called with WTRANS='M'.
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

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

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

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