VAPOR3 3.9.4
Public Types | Public Member Functions | List of all members
VAPoR::MatWaveBase Class Reference

A base class for a Matlab-like wavelet bank. More...

#include <MatWaveBase.h>

Inheritance diagram for VAPoR::MatWaveBase:
Wasp::MyBase VAPoR::MatWaveDwt VAPoR::MatWaveWavedec VAPoR::Compressor

Public Types

enum  dwtmode_t {
  INVALID = -1 , ZPD , SYMH , SYMW ,
  ASYMH , ASYMW , SP0 , SP1 ,
  PPD , PER
}
 
- Public Types inherited from Wasp::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 

Public Member Functions

 MatWaveBase (const string &wname, const string &mode)
 
 MatWaveBase (const string &wname)
 
virtual ~MatWaveBase ()
 
int dwtmode (const string &mode)
 
int dwtmode (dwtmode_t mode)
 
const string dwtmode () const
 
dwtmode_t dwtmodeenum () const
 
int wavelet (const string &wname)
 
string wavelet_name () const
 
const WaveFiltBasewavelet () const
 
size_t approxlength (size_t sigInLen) const
 
size_t detaillength (size_t sigInLen) const
 
size_t coefflength (size_t sigInLen) const
 
size_t coefflength2 (size_t sigInX, size_t sigInY) const
 
size_t coefflength3 (size_t sigInX, size_t sigInY, size_t sigInZ) const
 
size_t wmaxlev (size_t s) const
 
bool & InvalidFloatAbortOnOff ()
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Wasp::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message.
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code.
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code.
 
static int GetErrCode ()
 Retrieve the current error code.
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message.
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
static bool GetEnableErrMsg ()
 
- Static Public Attributes inherited from Wasp::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Detailed Description

A base class for a Matlab-like wavelet bank.

Author
John Clyne
Version
$Revision$
Date
$Date$

The MatWaveBase class is a base class for building Matlab-inspired wavelet filter banks. In many cases the methods provided behave similarly - in some cases indentically - to the Matlab Wavelet Toolbox version 4 command of the same name.

Definition at line 23 of file MatWaveBase.h.

Member Enumeration Documentation

◆ dwtmode_t

Enumerated boundary extension modes

Enumerator
INVALID 
ZPD 
SYMH 
SYMW 
ASYMH 
ASYMW 
SP0 
SP1 
PPD 
PER 

Definition at line 28 of file MatWaveBase.h.

Constructor & Destructor Documentation

◆ MatWaveBase() [1/2]

VAPoR::MatWaveBase::MatWaveBase ( const string &  wname,
const string &  mode 
)

Create a wavelet filter bank

Parameters
[in]wnameName of wavelet.
[in]modeThe boundary extension mode.
See also
dwtmode()

◆ MatWaveBase() [2/2]

VAPoR::MatWaveBase::MatWaveBase ( const string &  wname)

◆ ~MatWaveBase()

virtual VAPoR::MatWaveBase::~MatWaveBase ( )
virtual

Member Function Documentation

◆ approxlength()

size_t VAPoR::MatWaveBase::approxlength ( size_t  sigInLen) const

Returns length of approximation coefficients generated in a decompostition pass

This method returns the number of approximation coefficients generated by one decomposition pass through the filter bank for a signal of length, sigInLen.

Parameters
[in]sigInLenLength of input signal (number of samples)
Return values
lengthOn success returns the number of coefficients. A negative int is returned on failure.
See also
MatWaveDwt::dwt()

◆ coefflength()

size_t VAPoR::MatWaveBase::coefflength ( size_t  sigInLen) const
inline

Returns length of coefficients generated in a decompostition pass

This method returns the number of coefficients (approximation plus detail) generated by one decomposition pass through the filter bank for a signal of length, sigInLen.

Parameters
[in]sigInLenLength of input signal (number of samples)
Return values
lengthReturns the number of coefficients.
See also
MatWaveDwt::dwt()

Definition at line 136 of file MatWaveBase.h.

◆ coefflength2()

size_t VAPoR::MatWaveBase::coefflength2 ( size_t  sigInX,
size_t  sigInY 
) const
inline

Definition at line 138 of file MatWaveBase.h.

◆ coefflength3()

size_t VAPoR::MatWaveBase::coefflength3 ( size_t  sigInX,
size_t  sigInY,
size_t  sigInZ 
) const
inline

Definition at line 140 of file MatWaveBase.h.

◆ detaillength()

size_t VAPoR::MatWaveBase::detaillength ( size_t  sigInLen) const

Returns length of detail coefficients generated in a decompostition pass

This method returns the number of detail coefficients generated by one decomposition pass through the filter bank for a signal of length, sigInLen.

Parameters
[in]sigInLenLength of input signal (number of samples)
Return values
lengthReturns the number of coefficients.
See also
MatWaveDwt::dwt()

◆ dwtmode() [1/3]

const string VAPoR::MatWaveBase::dwtmode ( ) const

Get the current discrete wavelet extension transform mode

Parameters
[out]modeCurrent mode
Return values
statusa non-negative int is returned on success

◆ dwtmode() [2/3]

int VAPoR::MatWaveBase::dwtmode ( const string &  mode)

Set the discrete wavelet extension transform mode

Parameters
[in]modeValid values for mode are: "zpd", "symh", "symw", "asymh", "asymw", "sp0", "sp1", "spd", "ppd", and "per".
Return values
statusa non-negative int is returned on success

◆ dwtmode() [3/3]

int VAPoR::MatWaveBase::dwtmode ( dwtmode_t  mode)

Set the discrete wavelet extension transform mode

Parameters
[in]mode
Return values
statusa non-negative int is returned on success
See also
dwtmode_t

◆ dwtmodeenum()

dwtmode_t VAPoR::MatWaveBase::dwtmodeenum ( ) const
inline

Get the current discrete wavelet extension transform mode

Return values
mode

Definition at line 72 of file MatWaveBase.h.

◆ InvalidFloatAbortOnOff()

bool & VAPoR::MatWaveBase::InvalidFloatAbortOnOff ( )
inline

Set or get the abort-on-invalid-float flag

When set, the presence of input data containing invalid floats - floats for which the math.h isfinite() function does not return true - results in the abnormal termination of the method. If the flag is not set invalid floats are set to zero. By default the flag is not set.

Return values
flagA reference to the abot-on-invalid-float flag

Definition at line 166 of file MatWaveBase.h.

◆ wavelet() [1/2]

const WaveFiltBase * VAPoR::MatWaveBase::wavelet ( ) const
inline

Get the current discrete wavelet

Return values
wavelet

Definition at line 94 of file MatWaveBase.h.

◆ wavelet() [2/2]

int VAPoR::MatWaveBase::wavelet ( const string &  wname)

Set the current wavelet

Change the current wavelet to the one specified by wname.

Parameters
[in]wnameName of wavelet.
Return values
statusa non-negative int is returned on success

◆ wavelet_name()

string VAPoR::MatWaveBase::wavelet_name ( ) const
inline

Get the current discrete wavelet name

Return values
name

Definition at line 88 of file MatWaveBase.h.

◆ wmaxlev()

size_t VAPoR::MatWaveBase::wmaxlev ( size_t  s) const

Returns maximum wavelet decompostion level

This method returns the maximum level decomposition of a signal of length, s. This is the maximum number of times that a single level decomposition can be applied to a signal

Parameters
[in]Lengthof input signal
Return values
lengthReturns the maximum number of decompositions.
See also
MatWaveDwt::dwt(), MatWaveWavedec::wavedec()

The documentation for this class was generated from the following file: