/* *************************************** * LVQ Classifier * * Author: M.Babai@rug.nl * * LICENSE: * * Version 1.0 beta1. * * *************************************** */ #ifndef PndLVQClassify_H #define PndLVQClassify_H // Standard C++ libraries #include #include #include // Root includes #include "TFile.h" #include "TTree.h" #include "TRandom3.h" class PndLVQClassify{ public: /* Constructor * @param InPut, Input file name (Weights). * @param ClassNames, class names. * @param VarNames, variable names of the features. */ PndLVQClassify(const char* InPut, const std::vector& ClassNames, const std::vector& VarNames); /* * Destructor */ virtual ~PndLVQClassify(); /* *@param EvtData. Event data to be classified. * *@param result. Classification results. Currently the shortest * distance for each class is stored in result. */ void Classify(std::vector &EvtData, std::map& result); protected: /* * Computes the Euclidean distance between two given vectors of * event features. */ float ComputeDist(std::vector &EvtData, std::vector &proto); private: // Holds the class Names std::vector m_ClassNames; // Holds the Variable Names std::vector m_VarNames; // Holds the LVQ proto-types std::vector< std::pair*> > m_protoContainer; }; #endif//end of interface definition