#ifndef _PCA_h_
#define _PCA_h_
/* David Weenink, 20000517 */

#ifndef _Data_h_
	#include "Data.h"
#endif

#ifndef _TableOfReal_h_
	#include "TableOfReal.h"
#endif

#ifndef _Configuration_h_
	#include "Configuration.h"
#endif

#ifndef _Eigen_h_
	#include "Eigen.h"
#endif

#define PCA_members Eigen_members \
	long numberOfObservations;			\
	char **labels;						\
	double *centroid;
#define PCA_methods Eigen_methods
class_create (PCA, Eigen)

PCA PCA_create (long numberOfComponents, long dimension);

void PCA_setNumberOfObservations (PCA me, long numberOfObservations);
long PCA_getNumberOfObservations (PCA me);

PCA TableOfReal_to_PCA (I);
/* Calculate PCA of M'M */

void PCA_getEqualityOfEigenvalues (PCA me, long from, long to, int conservative,
	double *probability, double *chisq, long *ndf);
/* Morrison, Multivariate statistical methods, page 336 */

Configuration PCA_and_TableOfReal_to_Configuration (PCA me, thou, long numberOfDimensions);

#endif /* _PCA_h_ */

/* End of file PCA.h */
