28 #define GRT_DLL_EXPORTS 34 UINT WeakClassifier::numWeakClassifierInstances = 0;
38 StringWeakClassifierMap::iterator iter = getMap()->find( weakClassifierType );
39 if( iter == getMap()->end() ){
42 return iter->second();
49 numWeakClassifierInstances++;
53 if( --numWeakClassifierInstances == 0 ){
54 delete stringWeakClassifierMap;
55 stringWeakClassifierMap = NULL;
64 this->trainingLog = rhs.trainingLog;
65 this->errorLog = rhs.errorLog;
66 this->warningLog = rhs.warningLog;
72 if( weakClassifer == NULL ){
73 errorLog <<
"copyBaseVariables(const WeakClassifier *rhs) rhs is NULL!" << std::endl;
std::string weakClassifierType
A string that represents the weak classifier type, e.g. DecisionStump.
UINT numInputDimensions
The number of input dimensions to the weak classifier.
This is the main base class for all GRT WeakClassifiers.
WeakClassifier * createNewInstance() const
WeakClassifier & operator=(const WeakClassifier &rhs)
bool copyBaseVariables(const WeakClassifier *weakClassifer)
std::map< std::string, WeakClassifier *(*)() > StringWeakClassifierMap
bool trained
A flag to show if the weak classifier model has been trained.
static WeakClassifier * createInstanceFromString(std::string const &weakClassifierType)
virtual ~WeakClassifier()