GeneticAlgoithm
Implementation of the genetic algorithm
IModel.h
1 #ifndef IMODEL_H
2 #define IMODEL_H
3 
4 /**
5  * @brief Abstract class describing the interface for a model.
6  *
7  * A model is an entity that can be scored to describe it's fittness to answer the solution to a given problem.
8  * The implementation details are left for the derived classes.
9  *
10  * The only functionality provided in this interface is set/get accessors for the score.
11  * The score calculation is expected to be delegated to a class inheriting from IFigureOfMerit.
12  */
13 class IModel {
14 
15 public:
16 
17  /** Default Constructor. */
18  IModel();
19 
20  /** Destructor. */
21  virtual ~IModel()=0;
22 
23  /** Returns the score for this model. */
24  double getScore() const;
25 
26  /** Sets the score for this model. */
27  void setScore(double score);
28 
29 protected:
30 
31  double m_score; //!< Holds the score for this model.
32 };
33 
34 #endif
double m_score
Holds the score for this model.
Definition: IModel.h:31
double getScore() const
Definition: IModel.cxx:16
void setScore(double score)
Definition: IModel.cxx:24
virtual ~IModel()=0
Definition: IModel.cxx:9
IModel()
Definition: IModel.cxx:3
Abstract class describing the interface for a model.
Definition: IModel.h:13