#include <stdio.h>
#include "yahooTS.h"
Go to the source code of this file.
Functions  
main ()  
\function. More... 

\function. The entry point for code to test the wavelet packet transform. The code in main provides a simple example of how to call the wavelet packet transform code. This test case can be used with various wavelet functions (e.g., Haar, linear interpolation, Daubechies D4, polynomial interpolation). In the context of filters, the polynomial interpolation wavelets (see poly.h and polyHaar.h) are very bad choices. The polynomial interpolation wavelets do not divide the spectrum into high and low frequency components. Instead, the power spectrum shows one peak. I'm not sure if this means that the polynomial interpolation wavelets are bad for all applications. For example, another way to look at wavelets is as approximation functions. For example, wavelet compression relies approximation functions. In this case polynomial wavelets may be a good choice for some data sets. Definition at line 7 of file tstest.cpp. 00008 { 00009 const size_t VEC_SIZE = 512; 00010 double vec[VEC_SIZE]; 00011 yahooTS ts( "equities\\" ); 00012 00013 size_t N = VEC_SIZE; 00014 if (ts.getTS( "aa", vec, N, yahooTS::Close )) { 00015 for (size_t i = 0; i < VEC_SIZE; i++) { 00016 printf("%3d %f\n", i, vec[i] ); 00017 } 00018 } 00019 else { 00020 fprintf(stderr, "main: getTS failed\n"); 00021 } 00022 } 