Logo ROOT   6.10/09
Reference Guide
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
GaussFunction Class Reference

Definition at line 6 of file GaussFunction.h.

Public Types

enum  { kNPar = 3 }
 
- Public Types inherited from ROOT::Math::IParametricGradFunctionMultiDimTempl< T >
using BaseFunc = typename IParametricFunctionMultiDimTempl< T >::BaseFunc
 
using BaseGradFunc = IGradientFunctionMultiDim
 
using BaseParamFunc = IParametricFunctionMultiDimTempl< T >
 
- Public Types inherited from ROOT::Math::IParametricFunctionMultiDimTempl< T >
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

Public Member Functions

 GaussFunction (double _amp=1, double _mean=0, double _sigma=1)
 
double amp () const
 
ROOT::Math::IMultiGenFunctionClone () const
 Clone a function. More...
 
double logamp () const
 
double mean () const
 
unsigned int NDim () const
 Retrieve the dimension of the function. More...
 
unsigned int NPar () const
 Return the number of Parameters. More...
 
double operator() (const double *x, const double *p)
 
void ParameterGradient (const double *x, const double *p, double *g) const
 Evaluate the all the derivatives (gradient vector) of the function with respect to the parameters at a point x. More...
 
const double * Parameters () const
 Access the parameter values. More...
 
void SetParameters (const double *p)
 Set the parameter values. More...
 
double sigma () const
 
- Public Member Functions inherited from ROOT::Math::IParametricGradFunctionMultiDimTempl< T >
virtual ~IParametricGradFunctionMultiDimTempl ()
 Virtual Destructor (no operations) More...
 
double ParameterDerivative (const double *x, const double *p, unsigned int ipar=0) const
 Evaluate the partial derivative w.r.t a parameter ipar from values and parameters. More...
 
double ParameterDerivative (const double *x, unsigned int ipar=0) const
 Evaluate partial derivative using cached parameter values. More...
 
void ParameterGradient (const double *x, double *grad) const
 Evaluate all derivatives using cached parameter values. More...
 
- Public Member Functions inherited from ROOT::Math::IParametricFunctionMultiDimTempl< T >
operator() (const T *x, const double *p) const
 Evaluate function at a point x and for given parameters p. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor More...
 
operator() (const T *x) const
 Evaluate the function at a point x[]. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseParam
virtual ~IBaseParam ()
 Virtual Destructor (no operations) More...
 
virtual std::string ParameterName (unsigned int i) const
 Return the name of the i-th parameter (starting from zero) Overwrite if want to avoid the default name ("Par_0, Par_1, ...") More...
 

Private Member Functions

double DoDerivative (const double *x, unsigned int icoord) const
 
double DoEvalPar (const double *x, const double *p) const
 
double DoParameterDerivative (const double *x, const double *p, unsigned int ipar) const
 Evaluate the partial derivative w.r.t a parameter ipar , to be implemented by the derived classes. More...
 

Private Attributes

double fLogAmp
 
double fParams [kNPar]
 

#include </mnt/build/workspace/root-makedoc-v610/rootspi/rdoc/src/v6-10-00-patches/math/mathcore/test/fit/GaussFunction.h>

Inheritance diagram for GaussFunction:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kNPar 

Definition at line 10 of file GaussFunction.h.

Constructor & Destructor Documentation

◆ GaussFunction()

GaussFunction::GaussFunction ( double  _amp = 1,
double  _mean = 0,
double  _sigma = 1 
)
inline

Definition at line 14 of file GaussFunction.h.

Member Function Documentation

◆ amp()

double GaussFunction::amp ( ) const
inline

Definition at line 25 of file GaussFunction.h.

◆ Clone()

ROOT::Math::IMultiGenFunction* GaussFunction::Clone ( ) const
inlinevirtual

Clone a function.

Each derived class must implement their version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 35 of file GaussFunction.h.

◆ DoDerivative()

double GaussFunction::DoDerivative ( const double *  x,
unsigned int  icoord 
) const
inlineprivate

Definition at line 68 of file GaussFunction.h.

◆ DoEvalPar()

double GaussFunction::DoEvalPar ( const double *  x,
const double *  p 
) const
inlineprivate

Definition at line 60 of file GaussFunction.h.

◆ DoParameterDerivative()

double GaussFunction::DoParameterDerivative ( const double *  x,
const double *  p,
unsigned int  ipar 
) const
inlineprivatevirtual

Evaluate the partial derivative w.r.t a parameter ipar , to be implemented by the derived classes.

Implements ROOT::Math::IParametricGradFunctionMultiDimTempl< T >.

Definition at line 75 of file GaussFunction.h.

◆ logamp()

double GaussFunction::logamp ( ) const
inline

Definition at line 26 of file GaussFunction.h.

◆ mean()

double GaussFunction::mean ( ) const
inline

Definition at line 27 of file GaussFunction.h.

◆ NDim()

unsigned int GaussFunction::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 21 of file GaussFunction.h.

◆ NPar()

unsigned int GaussFunction::NPar ( ) const
inlinevirtual

Return the number of Parameters.

Implements ROOT::Math::IBaseParam.

Definition at line 23 of file GaussFunction.h.

◆ operator()()

double GaussFunction::operator() ( const double *  x,
const double *  p 
)
inline

Definition at line 39 of file GaussFunction.h.

◆ ParameterGradient()

void GaussFunction::ParameterGradient ( const double *  x,
const double *  p,
double *  grad 
) const
inlinevirtual

Evaluate the all the derivatives (gradient vector) of the function with respect to the parameters at a point x.

It is optional to be implemented by the derived classes for better efficiency

Reimplemented from ROOT::Math::IParametricGradFunctionMultiDimTempl< T >.

Definition at line 46 of file GaussFunction.h.

◆ Parameters()

const double* GaussFunction::Parameters ( ) const
inlinevirtual

Access the parameter values.

Implements ROOT::Math::IBaseParam.

Definition at line 30 of file GaussFunction.h.

◆ SetParameters()

void GaussFunction::SetParameters ( const double *  p)
inlinevirtual

Set the parameter values.

Parameters
pvector of doubles containing the parameter values.

to be defined: can user change number of params ? At the moment no.

Implements ROOT::Math::IBaseParam.

Definition at line 32 of file GaussFunction.h.

◆ sigma()

double GaussFunction::sigma ( ) const
inline

Definition at line 28 of file GaussFunction.h.

Member Data Documentation

◆ fLogAmp

double GaussFunction::fLogAmp
private

Definition at line 83 of file GaussFunction.h.

◆ fParams

double GaussFunction::fParams[kNPar]
private

Definition at line 82 of file GaussFunction.h.


The documentation for this class was generated from the following file: