GaussFunction Class Reference

#include <GaussFunction.h>

Inheritance diagram for GaussFunction:

ROOT::Math::IParametricGradFunctionMultiDim ROOT::Math::IParametricFunctionMultiDim ROOT::Math::IParametricFunctionMultiDim ROOT::Math::IBaseParam ROOT::Math::IBaseFunctionMultiDim ROOT::Math::IBaseParam ROOT::Math::IBaseFunctionMultiDim ROOT::Math::IBaseParam ROOT::Math::IBaseFunctionMultiDim ROOT::Math::IBaseParam ROOT::Math::IBaseFunctionMultiDim List of all members.

Public Types

enum  

Public Member Functions

 GaussFunction (double amp=1, double mean=0, double sigma=1)
unsigned int NDim () const
unsigned int NPar () const
double amp () const
double logamp () const
double mean () const
double sigma () const
const double * Parameters () const
void SetParameters (const double *p)
ROOT::Math::IMultiGenFunction * Clone () const
double operator() (const double *x, const double *p)
void ParameterGradient (const double *x, const double *p, double *g) const

Private Member Functions

double DoEvalPar (const double *x, const double *p) const
double DoDerivative (const double *x, unsigned int icoord) const
double DoParameterDerivative (const double *x, const double *p, unsigned int ipar) const

Private Attributes

double fParams [kNPar]
double fLogAmp

Detailed Description

Definition at line 6 of file GaussFunction.h.


Member Enumeration Documentation

anonymous enum

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.

References amp(), fLogAmp, fParams, log(), mean(), and sigma().

Referenced by Clone().


Member Function Documentation

unsigned int GaussFunction::NDim (  )  const [inline, virtual]

Retrieve the dimension of the function

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 21 of file GaussFunction.h.

unsigned int GaussFunction::NPar (  )  const [inline, virtual]

Return the number of Parameters

Implements ROOT::Math::IBaseParam.

Definition at line 23 of file GaussFunction.h.

References kNPar.

double GaussFunction::amp (  )  const [inline]

Definition at line 25 of file GaussFunction.h.

References fParams.

Referenced by Clone(), and GaussFunction().

double GaussFunction::logamp (  )  const [inline]

Definition at line 26 of file GaussFunction.h.

References fLogAmp.

double GaussFunction::mean (  )  const [inline]

Definition at line 27 of file GaussFunction.h.

References fParams.

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

double GaussFunction::sigma (  )  const [inline]

Definition at line 28 of file GaussFunction.h.

References fParams.

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

const double* GaussFunction::Parameters (  )  const [inline, virtual]

Access the parameter values

Implements ROOT::Math::IBaseParam.

Definition at line 30 of file GaussFunction.h.

References fParams.

void GaussFunction::SetParameters ( const double *  p  )  [inline, virtual]

Set the parameter values

Parameters:
p vector 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.

References copy(), fParams, and kNPar.

ROOT::Math::IMultiGenFunction* GaussFunction::Clone (  )  const [inline, virtual]

Clone a function. Each derived class must implement his version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 35 of file GaussFunction.h.

References amp(), GaussFunction(), mean(), and sigma().

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

Definition at line 39 of file GaussFunction.h.

References exp(), and y.

void GaussFunction::ParameterGradient ( const double *  x,
const double *  p,
double *  g 
) const [inline, virtual]

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.

References a, exp(), m, s, and y.

Referenced by DoParameterDerivative().

double GaussFunction::DoEvalPar ( const double *  x,
const double *  p 
) const [inline, private, virtual]

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.

References a, exp(), m, s, and y.

double GaussFunction::DoDerivative ( const double *  x,
unsigned int  icoord 
) const [inline, private]

Definition at line 68 of file GaussFunction.h.

References mean(), and sigma().

double GaussFunction::DoParameterDerivative ( const double *  x,
const double *  p,
unsigned int  ipar 
) const [inline, private, virtual]

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.

References ParameterGradient().


Member Data Documentation

double GaussFunction::fParams[kNPar] [private]

Definition at line 81 of file GaussFunction.h.

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

double GaussFunction::fLogAmp [private]

Definition at line 82 of file GaussFunction.h.

Referenced by GaussFunction(), and logamp().


The documentation for this class was generated from the following file:
Generated on Tue Jul 5 16:30:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1