GeneticAlgoithm
Implementation of the genetic algorithm
|
Class representing a model defined by a parametric function. More...
#include <ParametricModel.h>
Public Member Functions | |
ParametricModel () | |
virtual | ~ParametricModel () |
void | setFormula (TF1 *formula) |
TF1 * | getFormula () |
const TF1 * | getFormula () const |
![]() | |
IModel () | |
virtual | ~IModel ()=0 |
double | getScore () const |
void | setScore (double score) |
Protected Attributes | |
TF1 * | m_formula |
Holds the formula for this model. | |
![]() | |
double | m_score |
Holds the score for this model. | |
Class representing a model defined by a parametric function.
The implementation of this parametric model is a simple wrapper around ROOT's powerful TF1 formula class which allows to describe any function in any number of dimensions and depending on any number of parameters.
Another desired feature of TF1, is that it allows plotting 1D and 2D formulas with little extra code.
Definition at line 19 of file ParametricModel.h.
ParametricModel::ParametricModel | ( | ) |
Default Constructor
Definition at line 6 of file ParametricModel.cxx.
|
virtual |
Destructor
Definition at line 12 of file ParametricModel.cxx.
void ParametricModel::setFormula | ( | TF1 * | formula | ) |
Sets the formula for this model.
formula | A TF1 formula. |
This function keeps a clone of the formula in order to make sure that modifying it later does not affect other instances that might share the same original formula.
Definition at line 24 of file ParametricModel.cxx.
TF1 * ParametricModel::getFormula | ( | ) |
Returns the formula for this model.
Definition at line 35 of file ParametricModel.cxx.
const TF1 * ParametricModel::getFormula | ( | ) | const |
Returns the formula for this model.
Definition at line 45 of file ParametricModel.cxx.