/***********************************************************************   (C) Copyright, 1990 by Dean Rubine, Carnegie Mellon University    Permission to use this code for noncommercial purposes is hereby granted.    Permission to copy and distribute this code is hereby granted provided    this copyright notice is retained.  All other rights reserved. **********************************************************************//* single path classifier*/#define	MAXSCLASSES	100typedef int		    sClassIndex; /* single feature-vector class index */struct sclassdope {	char 		*name;	sClassIndex	number;	Vector		average;	Matrix		sumcov;	int		nexamples;/* #ifdef MAC	short 	refpoint;#endif */};typedef struct sclassdope  *sClassDope;	 /* single feature-vector class dope */struct sclassifier {	int		nfeatures;	int		nclasses;	sClassDope	*classdope;	Vector		cnst;	/* constant term of discrimination function */	Vector		*w;	/* array of coefficient weights */	Matrix		invavgcov; /* inverse covariance matrix *//* #ifdef MAC	FV			curfv;#endif */};typedef struct sclassifier *sClassifier; /* single feature-vector classifier */sClassifier	sNewClassifier (void);void	 	sFreeClassifier (sClassifier);	sClassDope  sAddClass(sClassifier, char*);void		sAddExample (sClassifier, char*, Vector);void		sRemoveExample (sClassifier, char*, Vector);void		sDoneAdding (sClassifier);	sClassDope	sClassify (sClassifier, Vector);sClassDope	sClassifyAD (sClassifier, Vector, FLOAT*, FLOAT*);sClassDope	sClassNameLookup (sClassifier, char*);FLOAT		MahalanobisDistance (Vector, Vector, Matrix);#ifdef MACHandle 		sCompile (sClassifier sc);sClassifier	sLoad (Handle);#elsesClassifier	sRead (FILE*);	void		sWrite (FILE*, sClassifier);#endif
