QMathFunction Class Reference

Inheritance diagram for QMathFunction:

QFitter List of all members.

Detailed Description

generic C++ interface on static functions

Author:
Marco Vignati


Public Types

typedef double(*) QRoutinePointer (double, double *params)
 pointer to function

Public Member Functions

 QMathFunction (QRoutinePointer funcpointer, unsigned int NParameters, double LowBound, double UpBound)
 constructor
 QMathFunction (const QMathFunction &func)
 copy constructor
virtual ~QMathFunction ()
 destructor
const QMathFunctionoperator= (const QMathFunction &func)
 operator=
void SetParameter (unsigned int p, double val)
 set parameter value
void SetParameter (unsigned int p, const char *name, double val)
 set parameter value and name
void SetParameters (const double *param)
 set all parameters from an array that has to be well sized
double GetParameter (unsigned int p) const
 get parameter
const double * GetParameters () const
 pointer to array of parameters
size_t GetNParameters () const
 get number of parameters
double Eval (double x) const
 evaluate function
double Eval (double x, double *params) const
 evaluate function with external parameters
virtual void Print ()
 print parameters and names if set
void SetVerbose (bool verbose=true)
 set verbose
virtual void SetTF1 (TF1 &tf1)
 set parameters from ROOT TF1
QError GetMinimum (double &min, double &minpos, double epsabs=0.001, double epsrel=0.0)
 get function minimum
QError GetMaximum (double &max, double &maxpos, double epsabs=0.001, double epsrel=0.0)
 get function maximum

Protected Member Functions

gsl_function GetGSLFunction ()
 return a gsl function
void SetParName (unsigned int p, const char *name)
 set parameter name

Protected Attributes

QRoutinePointer fRoutine
 pointer to the underlying static function
size_t fNParameters
 number of parameters
double * fParameters
 array of parameters
std::vector< const char * > fParNames
 parameters names
double fLowBound
 low function bound
double fUpBound
 high function bound
bool fVerbose
 verbose

Friends

class QMinimizer


Member Function Documentation

QError QMathFunction::GetMinimum ( double &  min,
double &  minpos,
double  epsabs = 0.001,
double  epsrel = 0.0 
)

get function minimum

Parameters:
min f(x_min)
minpos x_min
epsabs absolute precision
epsrel relative precision

QError QMathFunction::GetMaximum ( double &  max,
double &  maxpos,
double  epsabs = 0.001,
double  epsrel = 0.0 
)

get function maximum

Parameters:
max f(x_max)
maxpos x_max
epsabs absolute precision
epsrel relative precision


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:44 2009 for CUORE Software by  doxygen 1.5.1