ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
 
enum  { kNPar = 3 }
 
- Public Types inherited from ROOT::Math::IParametricGradFunctionMultiDim
typedef IParametricFunctionMultiDim BaseParamFunc
 
typedef IGradientFunctionMultiDim BaseGradFunc
 
typedef
IParametricFunctionMultiDim::BaseFunc 
BaseFunc
 
- Public Types inherited from ROOT::Math::IParametricFunctionMultiDim
typedef IBaseFunctionMultiDim BaseFunc
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDim
typedef IBaseFunctionMultiDim BaseFunc
 

Public Member Functions

 GaussFunction (double amp=1, double mean=0, double sigma=1)
 
unsigned int NDim () const
 Retrieve the dimension of the function. More...
 
unsigned int NPar () const
 Return the number of Parameters. More...
 
double amp () const
 
double logamp () const
 
double mean () const
 
double sigma () const
 
const doubleParameters () const
 Access the parameter values. More...
 
void SetParameters (const double *p)
 Set the parameter values. More...
 
ROOT::Math::IMultiGenFunctionClone () const
 Clone a function. 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...
 
 GaussFunction (double amp=1, double mean=0, double sigma=1)
 
unsigned int NDim () const
 Retrieve the dimension of the function. More...
 
unsigned int NPar () const
 Return the number of Parameters. More...
 
double amp () const
 
double logamp () const
 
double mean () const
 
double sigma () const
 
const doubleParameters () const
 Access the parameter values. More...
 
void SetParameters (const double *p)
 Set the parameter values. More...
 
ROOT::Math::IMultiGenFunctionClone () const
 Clone a function. 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...
 
- Public Member Functions inherited from ROOT::Math::IParametricGradFunctionMultiDim
virtual ~IParametricGradFunctionMultiDim ()
 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...
 
void ParameterGradient (const double *x, double *grad) const
 Evaluate all derivatives using cached parameter values. More...
 
double ParameterDerivative (const double *x, unsigned int ipar=0) const
 Evaluate partial derivative using cached parameter values. More...
 
- Public Member Functions inherited from ROOT::Math::IParametricFunctionMultiDim
double operator() (const double *x, const double *p) const
 Evaluate function at a point x and for given parameters p. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDim
 IBaseFunctionMultiDim ()
 
virtual ~IBaseFunctionMultiDim ()
 virtual destructor More...
 
double operator() (const double *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 DoEvalPar (const double *x, const double *p) const
 Implementation of the evaluation function using the x values and the parameters. More...
 
double DoDerivative (const double *x, unsigned int icoord) 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...
 
double DoEvalPar (const double *x, const double *p) const
 Implementation of the evaluation function using the x values and the parameters. More...
 
double DoDerivative (const double *x, unsigned int icoord) 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 fParams [kNPar]
 
double fLogAmp
 

#include </mnt/vdb/lsf/workspace/root-makedoc/rootspi/rdoc/src/master/math/mathcore/test/fit/GaussFunction.h>

Inheritance diagram for GaussFunction:
[legend]

Member Enumeration Documentation

anonymous enum
Enumerator
kNPar 

Definition at line 10 of file GaussFunction.h.

anonymous enum
Enumerator
kNPar 

Definition at line 10 of file GaussFunction.h.

Constructor & Destructor Documentation

GaussFunction::GaussFunction ( double  amp = 1,
double  mean = 0,
double  sigma = 1 
)
inline

Definition at line 14 of file GaussFunction.h.

Referenced by Clone().

GaussFunction::GaussFunction ( double  amp = 1,
double  mean = 0,
double  sigma = 1 
)
inline

Definition at line 14 of file GaussFunction.h.

Member Function Documentation

double GaussFunction::amp ( ) const
inline

Definition at line 25 of file GaussFunction.h.

Referenced by Clone(), and GaussFunction().

double GaussFunction::amp ( ) const
inline

Definition at line 25 of file GaussFunction.h.

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

Clone a function.

Each derived class must implement their version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 35 of file GaussFunction.h.

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

Clone a function.

Each derived class must implement their version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 35 of file GaussFunction.h.

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

Definition at line 68 of file GaussFunction.h.

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

Definition at line 68 of file GaussFunction.h.

double GaussFunction::DoEvalPar ( const double x,
const double p 
) const
inlineprivatevirtual

Implementation of the evaluation function using the x values and the parameters.

Must be implemented by derived classes

Implements ROOT::Math::IParametricFunctionMultiDim.

Definition at line 60 of file GaussFunction.h.

double GaussFunction::DoEvalPar ( const double x,
const double p 
) const
inlineprivatevirtual

Implementation of the evaluation function using the x values and the parameters.

Must be implemented by derived classes

Implements ROOT::Math::IParametricFunctionMultiDim.

Definition at line 60 of file GaussFunction.h.

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::IParametricGradFunctionMultiDim.

Definition at line 74 of file GaussFunction.h.

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::IParametricGradFunctionMultiDim.

Definition at line 75 of file GaussFunction.h.

double GaussFunction::logamp ( ) const
inline

Definition at line 26 of file GaussFunction.h.

double GaussFunction::logamp ( ) const
inline

Definition at line 26 of file GaussFunction.h.

double GaussFunction::mean ( ) const
inline

Definition at line 27 of file GaussFunction.h.

double GaussFunction::mean ( ) const
inline

Definition at line 27 of file GaussFunction.h.

Referenced by Clone(), DoDerivative(), and GaussFunction().

unsigned int GaussFunction::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 21 of file GaussFunction.h.

unsigned int GaussFunction::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 21 of file GaussFunction.h.

unsigned int GaussFunction::NPar ( ) const
inlinevirtual

Return the number of Parameters.

Implements ROOT::Math::IBaseParam.

Definition at line 23 of file GaussFunction.h.

unsigned int GaussFunction::NPar ( ) const
inlinevirtual

Return the number of Parameters.

Implements ROOT::Math::IBaseParam.

Definition at line 23 of file GaussFunction.h.

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

Definition at line 39 of file GaussFunction.h.

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

Definition at line 39 of file GaussFunction.h.

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::IParametricGradFunctionMultiDim.

Definition at line 46 of file GaussFunction.h.

Referenced by DoParameterDerivative().

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::IParametricGradFunctionMultiDim.

Definition at line 46 of file GaussFunction.h.

const double* GaussFunction::Parameters ( ) const
inlinevirtual

Access the parameter values.

Implements ROOT::Math::IBaseParam.

Definition at line 30 of file GaussFunction.h.

const double* GaussFunction::Parameters ( ) const
inlinevirtual

Access the parameter values.

Implements ROOT::Math::IBaseParam.

Definition at line 30 of file GaussFunction.h.

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.

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.

double GaussFunction::sigma ( ) const
inline

Definition at line 28 of file GaussFunction.h.

Referenced by Clone(), DoDerivative(), and GaussFunction().

double GaussFunction::sigma ( ) const
inline

Definition at line 28 of file GaussFunction.h.

Member Data Documentation

double GaussFunction::fLogAmp
private

Definition at line 83 of file GaussFunction.h.

Referenced by GaussFunction(), and logamp().

double GaussFunction::fParams
private

Definition at line 82 of file GaussFunction.h.

Referenced by amp(), GaussFunction(), mean(), Parameters(), SetParameters(), and sigma().

Collaboration diagram for GaussFunction:
[legend]

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