presage
0.8.7
|
#include <predictorRegistry.h>
Classes | |
class | Iterator |
class | PredictorRegistryException |
Public Member Functions | |
PredictorRegistry (Configuration *config) | |
~PredictorRegistry () | |
virtual void | update (const Observable *variable) |
Iterator | iterator () |
void | setContextTracker (ContextTracker *ct) |
Static Public Attributes | |
static const char * | LOGGER = "Presage.PredictorRegistry.LOGGER" |
static const char * | PREDICTORS = "Presage.PredictorRegistry.PREDICTORS" |
Private Member Functions | |
void | setLogger (const std::string &level) |
void | setPredictors (const std::string &predictor_list) |
void | addPredictor (const std::string &predictor_name) |
void | removePredictors () |
Private Attributes | |
Configuration * | config |
ContextTracker * | contextTracker |
Logger< char > | logger |
std::string | predictors_list |
std::vector< Predictor * > | predictors |
Dispatcher< PredictorRegistry > | dispatcher |
Manages instantiation and iteration through predictors and aids in generating predictions and learning.
PredictorRegitry class holds the active predictors and provides the interface required to obtain an iterator to the predictors.
The standard use case is: Predictor obtains an iterator from PredictorRegistry and invokes the predict() or learn() method on each Predictor pointed to by the iterator.
Predictor registry should eventually just be a simple wrapper around plump.
Definition at line 46 of file predictorRegistry.h.
PredictorRegistry::PredictorRegistry | ( | Configuration * | config | ) |
Definition at line 46 of file predictorRegistry.cpp.
References config, dispatcher, Configuration::find(), LOGGER, Dispatcher< class_t >::map(), PREDICTORS, setLogger(), and setPredictors().
Definition at line 58 of file predictorRegistry.cpp.
References removePredictors().
void PredictorRegistry::addPredictor | ( | const std::string & | predictor_name | ) | [private] |
Definition at line 97 of file predictorRegistry.cpp.
References config, contextTracker, endl(), logger, predictors, and PRESAGE_INIT_PREDICTOR_ERROR.
Referenced by setPredictors().
Definition at line 146 of file predictorRegistry.cpp.
References predictors.
Referenced by PredictorActivator::predict(), and ContextTracker::update().
void PredictorRegistry::removePredictors | ( | ) | [private] |
Definition at line 137 of file predictorRegistry.cpp.
References endl(), logger, and predictors.
Referenced by setContextTracker(), setPredictors(), and ~PredictorRegistry().
void PredictorRegistry::setContextTracker | ( | ContextTracker * | ct | ) |
Definition at line 70 of file predictorRegistry.cpp.
References contextTracker, predictors_list, removePredictors(), and setPredictors().
Referenced by ContextTracker::ContextTracker().
void PredictorRegistry::setLogger | ( | const std::string & | level | ) | [private] |
Definition at line 63 of file predictorRegistry.cpp.
References endl(), logger, and setlevel().
Referenced by PredictorRegistry().
void PredictorRegistry::setPredictors | ( | const std::string & | predictor_list | ) | [private] |
Definition at line 78 of file predictorRegistry.cpp.
References addPredictor(), contextTracker, endl(), logger, predictors_list, and removePredictors().
Referenced by PredictorRegistry(), and setContextTracker().
void PredictorRegistry::update | ( | const Observable * | variable | ) | [virtual] |
Implements Observer.
Definition at line 176 of file predictorRegistry.cpp.
References Dispatcher< class_t >::dispatch(), dispatcher, endl(), Observable::get_name(), Observable::get_value(), and logger.
Configuration* PredictorRegistry::config [private] |
Definition at line 89 of file predictorRegistry.h.
Referenced by addPredictor(), and PredictorRegistry().
ContextTracker* PredictorRegistry::contextTracker [private] |
Definition at line 90 of file predictorRegistry.h.
Referenced by addPredictor(), setContextTracker(), and setPredictors().
Definition at line 96 of file predictorRegistry.h.
Referenced by PredictorRegistry(), and update().
const char * PredictorRegistry::LOGGER = "Presage.PredictorRegistry.LOGGER" [static] |
Definition at line 80 of file predictorRegistry.h.
Referenced by PredictorRegistry().
Logger<char> PredictorRegistry::logger [private] |
Definition at line 91 of file predictorRegistry.h.
Referenced by addPredictor(), removePredictors(), setLogger(), setPredictors(), and update().
const char * PredictorRegistry::PREDICTORS = "Presage.PredictorRegistry.PREDICTORS" [static] |
Definition at line 81 of file predictorRegistry.h.
Referenced by PredictorRegistry().
std::vector<Predictor*> PredictorRegistry::predictors [private] |
Definition at line 94 of file predictorRegistry.h.
Referenced by addPredictor(), iterator(), and removePredictors().
std::string PredictorRegistry::predictors_list [private] |
Definition at line 93 of file predictorRegistry.h.
Referenced by setContextTracker(), and setPredictors().