// Filename: "cVQ.h" #ifndef CVQ_H #define CVQ_H #include "maincode.h" #include "cCluster.h" #include #include class cVQ { private: cCluster Cluster[MAXCLUSTER]; int NumPatterns; //Number of patterns int SizeVector; //Number of dimensions in vector int NumClusters; //Current number of clusters double Threshold; void cVQ::Attach(int c,int p); int AllocateCluster(); //Adds a pattern to a cluster's membership list. //Find cluster center for modified clusters void cVQ::CalcNewClustCenter(int c, double Pattern[MAXPATTERN][MAXVECTDIM]); //Calculates Euclidean norm vector. double cVQ::EucNorm(int p, int c, double Pattern[MAXPATTERN][MAXVECTDIM]); //Returns index of the cluster closest to pattern whose index is pat. int cVQ::FindClosestCluster(int pat, double Pattern[MAXPATTERN][MAXVECTDIM]); public: cVQ::cVQ(int nPatterns, int vSize, double vThreshold); //Control overall Vector Quant process void cVQ::RunVQ(double Pattern[MAXPATTERN][MAXVECTDIM]); cCluster cVQ::getCluster(int index); int cVQ::getNumClusters(); }; // end cCluster class. #endif