#ifndef _Wavelet_h_
#define _Wavelet_h_
/* Wavelet.h
 *
 * Copyright (C) 1992-2002 David Weenink & Paul Boersma
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*
 * pb 1996/08/16
 * pb 2002/07/16 GPL
 */

#ifndef _Data_h_
	#include "Data.h"
#endif
#ifndef _Graphics_h_
	#include "Graphics.h"
#endif

#include "Wavelet_def.h"
#define Wavelet_methods Data_methods
oo_CLASS_CREATE (Wavelet, Data)

Wavelet Wavelet_create (long n, double highestFrequency, long ncof);
/*
	Function:
		return a new Wavelet, or NULL if out of memory.
	Preconditions:
		n > 0;
		ncof > 0;
		highestFrequency > 0.0;
	Postconditions:
		my n == n;
		my ncof == ncof;
		my highestFrequency == highestFrequency;
*/ 

void Wavelet_draw (Wavelet me, Graphics g, double tmin, double tmax, double fmin, double fmax);
 
Wavelet Wavelet_truncateByFraction (Wavelet me, double fraction);
/*
	Function:
		truncate to zero all wavelet samples
		whose absolute values are below the set quantile 1 - "fraction".  
	Preconditions:
		0.0 < fraction <= 1.0;
*/ 

Wavelet Wavelet_truncateByLevel (Wavelet me, double level);
/*
	Function:
		truncate all wavelet values to zeros, that are below "level".  
*/
 
double Wavelet_fractionBelowLevel (Wavelet me, double level);
/*
	Function:
		calculates the fraction of the wavelet amplitudes whose absolute values are below "level".
	Postconditions:
		0.0 <= result <= 1.0;
*/

/* End of file Wavelet.h */
#endif

