#ifndef _Harmonicity_h_
#define _Harmonicity_h_
/* Harmonicity.h; Paul Boersma, June 4, 2002 */

#ifndef _Vector_h_
	#include "Vector.h"
#endif

#define Harmonicity_members  Vector_members
#define Harmonicity_methods  Vector_methods
class_create (Harmonicity, Vector)

/* Attributes:
		xmin				// Starting time (seconds).
		xmax > xmin		// End time (seconds).
		nx >= 1			// Number of time slices.
		dx > 0.0			// Time step (seconds).
		x1				// Centre of first time slice (seconds).
		ymin, ymax, ny, dy, y1 = 1
		z [1] [1..nt]
			// The harmonic strength, a real number between -150 dB and +150 dB:
			// -150 dB means not periodic at all, +150 dB means perfectly periodic.
			// Normal values for speech are between -10 dB for [s] and +30 dB for [u].
			// -200 means silence.
*/

Harmonicity Harmonicity_create (double tmin, double tmax, long nt, double dt, double t1);

void Harmonicity_draw (I, double tmin, double tmax, double min, double max);
/*
	draw a harmonicity contour into the current Graphics.
	If tmax <= tmin, draw whole time domain.
	If max <= min, scale to extrema.
*/

double Harmonicity_getMean (Harmonicity me, double tmin, double tmax);
double Harmonicity_getStandardDeviation (Harmonicity me, double tmin, double tmax);
double Harmonicity_getQuantile (Harmonicity me, double quantile);

Matrix Harmonicity_to_Matrix (Harmonicity me);
Harmonicity Matrix_to_Harmonicity (I);

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