Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

packdata Class Template Reference

The packdata class is a container for the core information for a wavelet packet transform node. More...

#include <packdata.h>

Inheritance diagram for packdata::

packnode List of all members.

Public Types

enum  transformKind { BadNodeKind, OriginalData, LowPass, HighPass }

Public Methods

 packdata (T *vec, const size_t n, const transformKind k)
 
  • vec a pointer to an array of type T elements
  • n the size of the array of type T elements
  • k the kind of data (e.g., original data, low pass result, high pass result.
More...


virtual ~packdata ()
 define a virtual destructure which in the base class. More...

void* operator new (unsigned int num_bytes)
 Overload the standard new operator and allocate memory from the memory pool. More...

void pr () const
 print the data. More...

const T* getData ()
 get a pointer to the data. More...

const transformKind getKind ()
 Return the "kind" of data (e.g., original data, low pass result, high pass result). More...

size_t length ()
 return the length of the array in the packdata object. More...


Protected Methods

 packdata ()
 default constructor. More...


Protected Attributes

transformKind kind
 Kind of data: original data, result of the low pass filer (wavelet scaling function), result of the high pass filter (wavelet function). More...

size_t N
 number of elements at this packet tree level. More...

T* data
 Wavelet packet data. More...


Private Methods

 packdata (const packdata &rhs)
 Disallow the copy constructor. More...


Detailed Description

template<class T> class packdata

The packdata class is a container for the core information for a wavelet packet transform node.

This class serves as the base class for the packnode class. It is also the element used in the list that results from the wavelet packet transform. This list represents the data in a minimal for, relative to the wavelet packet transform cost function.

Author:
Ian Kaplan

Definition at line 53 of file packdata.h.


Member Enumeration Documentation

template<class T>
enum packdata<T>::transformKind
 

Enumeration values:
BadNodeKind  
OriginalData  
LowPass  
HighPass  

Definition at line 59 of file packdata.h.

00059                { BadNodeKind,
00060                  OriginalData,
00061                  LowPass,
00062                  HighPass } transformKind;


Constructor & Destructor Documentation

template<class T>
packdata<T>::packdata<T> ( const packdata<T> & rhs ) [inline, private]
 

Disallow the copy constructor.

Definition at line 56 of file packdata.h.

00056 {}

template<class T>
packdata<T>::packdata<T> ( ) [inline, protected]
 

default constructor.

Definition at line 77 of file packdata.h.

00077 {}

template<class T>
packdata<T>::packdata<T> ( T * vec,
const size_t n,
const transformKind k ) [inline]
 

  • vec a pointer to an array of type T elements
  • n the size of the array of type T elements
  • k the kind of data (e.g., original data, low pass result, high pass result.

Definition at line 86 of file packdata.h.

00087   {
00088     data = vec;
00089     N = n;
00090     kind = k;
00091   }

template<class T>
packdata<T>::~packdata<T> ( ) [inline, virtual]
 

define a virtual destructure which in the base class.

Definition at line 94 of file packdata.h.

00094 {}


Member Function Documentation

template<class T>
const T * packdata<T>::getData ( ) [inline]
 

get a pointer to the data.

Definition at line 120 of file packdata.h.

Referenced by invpacktree_int::add_elem(), invpacktree::add_elem(), calcPacketWidth(), costwidth::costCalc(), costshannon::costCalc(), invpacktree_int::new_level(), and invpacktree::new_level().

00120 { return data; }

template<class T>
const transformKind packdata<T>::getKind ( ) [inline]
 

Return the "kind" of data (e.g., original data, low pass result, high pass result).

Definition at line 126 of file packdata.h.

Referenced by packtree_int::checkBestBasis(), and packtree::checkBestBasis().

00126 { return kind; }

template<class T>
size_t packdata<T>::length ( void ) [inline]
 

return the length of the array in the packdata object.

Definition at line 129 of file packdata.h.

Referenced by invpacktree_int::add_elem(), invpacktree::add_elem(), calcPacketWidth(), costwidth::costCalc(), costthresh::costCalc(), costshannon::costCalc(), packtree_base_int::newLevel(), packtree_base::newLevel(), invpacktree_int::new_level(), invpacktree::new_level(), packcontainer::packcontainer(), and packcontainer_int::packcontainer_int().

00129 { return N; }

template<class T>
void * packdata<T>::operator new ( unsigned int num_bytes ) [inline]
 

Overload the standard new operator and allocate memory from the memory pool.

Definition at line 100 of file packdata.h.

00101   {
00102     block_pool mem_pool;
00103 
00104     void *mem_addr = mem_pool.pool_alloc( num_bytes );
00105     return mem_addr;
00106   } // new

template<class T>
void packdata<T>::pr ( ) const [inline]
 

print the data.

Definition at line 110 of file packdata.h.

Referenced by packtree_base_int::breadthFirstPrint(), packtree_base::breadthFirstPrint(), and packdata_list::pr().

00111   {
00112     for (int i = 0; i < N; i++) {
00113       printf("%7.4f ", data[i] );
00114     }
00115     printf("\n");
00116   } // pr


Member Data Documentation

template<class T>
size_t packdata<T>::N [protected]
 

number of elements at this packet tree level.

Definition at line 71 of file packdata.h.

template<class T>
T * packdata<T>::data [protected]
 

Wavelet packet data.

Definition at line 74 of file packdata.h.

template<class T>
transformKind packdata<T>::kind [protected]
 

Kind of data: original data, result of the low pass filer (wavelet scaling function), result of the high pass filter (wavelet function).

Definition at line 68 of file packdata.h.


The documentation for this class was generated from the following file:
Generated at Sat Aug 10 13:23:38 2002 for Wavelet Packet Transform and Lossless Compression by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001