presage  0.9.2~beta
Public Member Functions | List of all members
DummyPredictor Class Reference

#include <dummyPredictor.h>

Inheritance diagram for DummyPredictor:
Inheritance graph
Collaboration diagram for DummyPredictor:
Collaboration graph

Public Member Functions

 DummyPredictor (Configuration *, ContextTracker *, const char *)
 
 ~DummyPredictor ()
 
virtual Prediction predict (const size_t size, const char **filter) const
 Generate prediction. More...
 
virtual void learn (const std::vector< std::string > &change)
 
- Public Member Functions inherited from Predictor
 Predictor (Configuration *configuration, ContextTracker *contextTracker, const char *predictorName="Predictor", const char *shortDescription="", const char *longDescription="")
 
virtual ~Predictor ()
 
const std::string getName () const
 
const std::string getShortDescription () const
 
const std::string getLongDescription () const
 

Additional Inherited Members

- Protected Member Functions inherited from Predictor
virtual bool token_satisfies_filter (const std::string &token, const std::string &prefix, const char **filter) const
 
virtual void set_logger (const std::string &level)
 
- Protected Attributes inherited from Predictor
const std::string name
 
const std::string shortDescription
 
const std::string longDescription
 
const std::string PREDICTORS
 
ContextTrackercontextTracker
 
Configurationconfiguration
 
Logger< char > logger
 

Detailed Description

Dummy predictor is provided here to show how to implement real predictors.

Definition at line 34 of file dummyPredictor.h.

Constructor & Destructor Documentation

◆ DummyPredictor()

DummyPredictor::DummyPredictor ( Configuration config,
ContextTracker ct,
const char *  name 
)

Definition at line 28 of file dummyPredictor.cpp.

◆ ~DummyPredictor()

DummyPredictor::~DummyPredictor ( )

Definition at line 38 of file dummyPredictor.cpp.

Member Function Documentation

◆ learn()

void DummyPredictor::learn ( const std::vector< std::string > &  change)
virtual

Implements Predictor.

Definition at line 73 of file dummyPredictor.cpp.

References endl().

Here is the call graph for this function:

◆ predict()

Prediction DummyPredictor::predict ( const size_t  size,
const char **  filter 
) const
virtual

Generate prediction.

Parameters
sizedesired prediction size
filterfilter

Implements Predictor.

Definition at line 41 of file dummyPredictor.cpp.

References Prediction::addSuggestion().

Here is the call graph for this function:

The documentation for this class was generated from the following files: