// Filename: "cLVQ1.h" #ifndef CLVQ1_H #define CLVQ1_H #include "globals.h" class cLVQ1 { private: double DECAY_RATE; //About 100 iterations. double MIN_ALPHA; double RADIUS_REDUCTION_POINT; //Last 20% of iterations. double alpha; double * d; //Network nodes. The "clusters" int mIterations; int mReductionPoint; double **w; //Weight matrix. int **mPattern; //Training patterns. int * mTarget; void cLVQ1::updateWeights(int vectorNumber, int dMin); void cLVQ1::computeInput(int **vectorArray, int vectorNumber); void cLVQ1::computeInput(int vectorArray[VEC_LEN]); void cLVQ1::clearArray(double anArray[N_CLUSTERS]); int cLVQ1::minimum(double nodeArray[N_CLUSTERS]); public: cLVQ1(int tPatterns[T_PATTERNS][VEC_LEN], int targets[T_PATTERNS]); ~cLVQ1(); void cLVQ1::trainNetwork(); void cLVQ1::initializeWeights(int clusterNumber, int tPattern[VEC_LEN]); int cLVQ1::iterations() const; int cLVQ1::reductionPoint() const; void cLVQ1::patterns(int retArray[T_PATTERNS][VEC_LEN]); void cLVQ1::weights(double retArray[T_PATTERNS][VEC_LEN]); int cLVQ1::getCluster(int inputPattern[VEC_LEN]); }; // end cLVQ1 class. #endif