#ifndef _Cepstrum_h_
#define _Cepstrum_h_
/*
	Complex Cepstrum.
	
	The complex cepstrum is a sequence of REAL numbers.
	It is the inverse-fourier-transformed COMPLEX logarithm of the spectrum
	of a (sound) signal. 
	It is only called 'complex cepstrum' because the complex logarithm is taken.

	David Weenink, 20010111
*/

#ifndef _Matrix_h_
	#include "Matrix.h"
#endif
#ifndef _Graphics_h_
	#include "Graphics.h"
#endif

#define Cepstrum_members  Matrix_members
#define Cepstrum_methods  Matrix_methods
class_create (Cepstrum, Matrix)

/*
	xmin		// Lowest quefrency.
	xmax		// Highest quefrency.
	nx			// Number of quefrencies.
	dx			// Quefrency step.
	x1			// First quefrency.
	
	ymin = ymax = dy = y1 = 1
	ny = 1
*/

Cepstrum Cepstrum_create (double qmin, double qmax, long nq);
/* Preconditions:
		qmin < qmax;
		nq >= 2;
	Postconditions:
		my xmin = qmin;				my ymin = 1;
		my xmax = qmax;				my ymax = 1;
		my nx = nq;					my ny = 1;
		my dx = qmax / nx;			my dy = 1;
		my x1 = my dx / 2;			my y1 = 1;
		my z [1..ny] [1..nx] = 0.0;
*/
		
void Cepstrum_draw (Cepstrum me, Graphics g, double qmin, double qmax, 
	double minimum, double maximum, int garnish);
/*
	Function:
		draw a Cepstrum into a Graphics.
	Preconditions:
		maximum > minimum;
	Arguments:
		[qmin, qmax]: quefrencies; x domain of drawing;
		Autowindowing: if qmax <= qmin, x domain of drawing is
			[my xmin, my xmax].
		[minimum, maximum]: amplitude; y range of drawing.
*/

Matrix Cepstrum_to_Matrix (Cepstrum me);
Cepstrum Matrix_to_Cepstrum (Matrix me, long row);

#endif /* _Cepstrum_h_ */
