33 UINT WeakClassifier::numWeakClassifierInstances = 0;
37 StringWeakClassifierMap::iterator iter = getMap()->find( weakClassifierType );
38 if( iter == getMap()->end() ){
41 return iter->second();
48 numWeakClassifierInstances++;
52 if( --numWeakClassifierInstances == 0 ){
53 delete stringWeakClassifierMap;
54 stringWeakClassifierMap = NULL;
63 this->trainingLog = rhs.trainingLog;
64 this->errorLog = rhs.errorLog;
65 this->warningLog = rhs.warningLog;
71 if( weakClassifer == NULL ){
72 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()