/* file: defs.h		G. Moody	12 January 1992
			Last revised:	21 July 1999
-------------------------------------------------------------------------------
defs.h: Common definitions for the principal components tutorial software
Copyright (C) 1999 George B. Moody

This file 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., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.

You may contact the author by e-mail (george@mit.edu) or postal mail
(MIT Room E25-505A, Cambridge, MA 02139 USA).  For updates to this software,
please visit PhysioNet (http://physionet.org/).
_______________________________________________________________________________
*/

#define PVDIM	10	/* number of elements in a pattern vector */
#define	FVDIM	2	/* number of elements in a feature vector */

struct patternvector {
  int v[PVDIM];		/* pattern vector components */
  long time;		/* time (sample number) within record */
  char anntyp;		/* annotation type (copied from annotation file) */
};

struct eigenvector {
  double e[PVDIM];	/* eigenvector components */
  double lambda;	/* eigenvalue */
};

struct featurevector {
  double v[FVDIM];	/* feature vector components */
  double rsq;		/* squared residual error, normalized by total power */
  long time;		/* time (sample number) within record */
  char anntyp;		/* annotation type (copied from input file) */
};
