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

costwidth Class Reference

For a wavelet packet tree node, consisting of n integer values, calculate the minimal number of bits needed to represent the values. More...

#include <costwidth.h>

Inheritance diagram for costwidth::

costbase_int List of all members.

Public Methods

 costwidth (packnode< int > *root)

Protected Methods

int costCalc (packnode< int > *root)
 Cost function to be defined by the subclass. More...


Detailed Description

For a wavelet packet tree node, consisting of n integer values, calculate the minimal number of bits needed to represent the values.

This cost function is used for lossless wavelet packet compression.

Definition at line 48 of file costwidth.h.


Constructor & Destructor Documentation

costwidth::costwidth ( packnode< int > * root ) [inline]
 

Definition at line 53 of file costwidth.h.

00053 { traverse( root ); }


Member Function Documentation

int costwidth::costCalc ( packnode< int > * root ) [protected, virtual]
 

Cost function to be defined by the subclass.

Reimplemented from costbase_int.

Definition at line 39 of file costwidth.cpp.

00040 {
00041   assert( root != 0 );
00042 
00043   size_t N = root->length();
00044   const int *a = root->getData();
00045 
00046   int width = support::vecWidth( a, N );
00047 
00048   return width;
00049 } // costCalc


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