GeneticAlgoithm
Implementation of the genetic algorithm
ParametricModel.h
1 #ifndef PARAMETRICMODEL_H
2 #define PARAMETRICMODEL_H
3 
4 #include "IModel.h"
5 
6 #include <TF1.h>
7 
8 /**
9  * @brief Class representing a model defined by a parametric function.
10  *
11  * The implementation of this parametric model is a simple wrapper around ROOT's powerful
12  * <a href="https://root.cern.ch/doc/v610/classTF1.html">TF1</a>
13  * formula class which allows to describe any function in any number of dimensions
14  * and depending on any number of parameters.
15  *
16  * Another desired feature of <a href="https://root.cern.ch/doc/v610/classTF1.html">TF1</a>,
17  * is that it allows plotting 1D and 2D formulas with little extra code.
18  */
19 class ParametricModel : public IModel {
20 
21 public:
22 
23  /** Default Constructor */
25 
26  /** Destructor */
27  virtual ~ParametricModel();
28 
29  /** Sets the formula for this model. */
30  void setFormula(TF1 *formula);
31 
32  /** Returns the formula for this model. */
33  TF1 *getFormula();
34 
35  /** Returns the formula for this model. */
36  const TF1 *getFormula() const;
37 
38 protected:
39 
40  TF1 *m_formula; //!< Holds the formula for this model.
41 };
42 
43 #endif
void setFormula(TF1 *formula)
virtual ~ParametricModel()
TF1 * m_formula
Holds the formula for this model.
Class representing a model defined by a parametric function.
Abstract class describing the interface for a model.
Definition: IModel.h:13