GeneticAlgoithm
Implementation of the genetic algorithm
include
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
IModel::m_score
double m_score
Holds the score for this model.
Definition:
IModel.h:31
IModel::getScore
double getScore() const
Definition:
IModel.cxx:16
IModel::setScore
void setScore(double score)
Definition:
IModel.cxx:24
IModel::~IModel
virtual ~IModel()=0
Definition:
IModel.cxx:9
IModel::IModel
IModel()
Definition:
IModel.cxx:3
IModel
Abstract class describing the interface for a model.
Definition:
IModel.h:13
Generated by
1.8.13