#ifndef _Ltas_h_
#define _Ltas_h_
/* Ltas.h
 *
 * Copyright (C) 1992-2003 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 2003/04/16
 */

#ifndef _Vector_h_
	#include "Vector.h"
#endif
#ifndef _Graphics_h_
	#include "Graphics.h"
#endif
#ifndef _Collection_h_
	#include "Collection.h"
#endif

#define Ltas_members  Vector_members
#define Ltas_methods  Vector_methods
class_create (Ltas, Vector)

/*
	Attributes:
		xmin				// Minimum frequency (Hz).
		xmax > xmin		// Maximum frequency (Hz).
		nx >= 1			// Number of bands.
		dx > 0.0			// Band width (Hz).
		x1				// Centre of first band (Hz).
		ymin, ymax, ny, dy, y1 = 1
		z [1] [1..nx]		// The intensity per band, in db/Hz.
*/

Ltas Ltas_create (long nx, double dx);
/*
	Function:
		create an Ltas, or NULL if out of memory.
	Preconditions:
		nx >= 1;
		dx > 0.0;
	Postconditions:
		my xmin == 0;				my ymin == 1;
		my xmax == nx * dx;		my ymax == 1;
		my nx == nx;				my ny == 1;
		my dx == dx;				my dy == 1;
		my x1 == 0.5 * dx;			my y1 == 1;
		my z [1] [1..nx] == 1e-4; // straight tube, area 1 cm2.
 */

void Ltas_draw (Ltas me, Graphics g, double fmin, double fmax,
	double minimum, double maximum, int garnish);

Matrix Ltas_to_Matrix (Ltas me);
/*
	Create a Matrix from an Ltas,
	with deep copy of all of its Matrix attributes, except class information and methods.
	Return NULL if out of memory.  
*/

Ltas Matrix_to_Ltas (Matrix me);
/*
	Function:
		create an Ltas from a Matrix.
		Return NULL if out of memory.
	Postconditions:
		thy xmin == my xmin;
		thy xmax == my xmax;
		thy nx == my nx;
		thy dx == my dx;
		thy x1 == my x1;
		thy ymin ymax ny dy y1 == 1;
		thy z [1] [...] == my z [1] [...];
*/

Ltas Ltases_merge (Collection ltases);

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