CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::Sigma Class Reference

#include <Sigma.hh>

+ Inheritance diagram for Genfun::Sigma:

Public Member Functions

 Sigma ()
 
 Sigma (const Sigma &right)
 
virtual ~Sigma ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) const override
 
virtual unsigned int dimensionality () const override
 
Derivative partial (unsigned int) const override
 
virtual bool hasAnalyticDerivative () const override
 
void accumulate (const AbsFunction &fcn)
 
- Public Member Functions inherited from Genfun::AbsFunction
 AbsFunction ()
 
 AbsFunction (const AbsFunction &right)
 
virtual ~AbsFunction ()
 
virtual unsigned int dimensionality () const
 
virtual double operator() (double argument) const =0
 
virtual double operator() (const Argument &argument) const =0
 
virtual AbsFunctionclone () const =0
 
virtual FunctionComposition operator() (const AbsFunction &f) const
 
virtual ParameterComposition operator() (const AbsParameter &p) const
 
Derivative derivative (const Variable &v) const
 
Derivative prime () const
 
virtual bool hasAnalyticDerivative () const
 
virtual Derivative partial (unsigned int) const
 

Detailed Description

Author

Definition at line 19 of file Sigma.hh.

Constructor & Destructor Documentation

◆ Sigma() [1/2]

Genfun::Sigma::Sigma ( )

Definition at line 13 of file Sigma.cc.

14{
15}

◆ Sigma() [2/2]

Genfun::Sigma::Sigma ( const Sigma right)

Definition at line 17 of file Sigma.cc.

17 : AbsFunction(right)
18{
19 for (size_t i=0; i<right._fcn.size();i++) {
20 _fcn.push_back(right._fcn[i]->clone());
21 }
22}

◆ ~Sigma()

Genfun::Sigma::~Sigma ( )
virtual

Definition at line 29 of file Sigma.cc.

30{
31 for (size_t i=0; i<_fcn.size();i++) {
32 delete _fcn[i];
33 }
34}

Member Function Documentation

◆ accumulate()

void Genfun::Sigma::accumulate ( const AbsFunction fcn)

Definition at line 9 of file Sigma.cc.

9 {
10 _fcn.push_back(fcn.clone());
11}

Referenced by partial().

◆ dimensionality()

unsigned int Genfun::Sigma::dimensionality ( ) const
overridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 24 of file Sigma.cc.

24 {
25 assert (_fcn.size()!=0);
26 return _fcn[0]->dimensionality();
27}

◆ hasAnalyticDerivative()

virtual bool Genfun::Sigma::hasAnalyticDerivative ( ) const
inlineoverridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 45 of file Sigma.hh.

45{return true;}

◆ operator()() [1/2]

double Genfun::Sigma::operator() ( const Argument a) const
overridevirtual

Implements Genfun::AbsFunction.

Definition at line 44 of file Sigma.cc.

45{
46 double retVal=0.0;
47 for (size_t i=0;i<_fcn.size();i++) retVal += (*_fcn[i])(x);
48 return retVal;
49}

◆ operator()() [2/2]

double Genfun::Sigma::operator() ( double  argument) const
overridevirtual

Implements Genfun::AbsFunction.

Definition at line 36 of file Sigma.cc.

37{
38 double retVal=0.0;
39 for (size_t i=0;i<_fcn.size();i++) retVal += (*_fcn[i])(x);
40 return retVal;
41}

◆ partial()

Derivative Genfun::Sigma::partial ( unsigned int  index) const
overridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 53 of file Sigma.cc.

53 {
54 Sigma fPrime;
55 for (size_t i=0;i<_fcn.size();i++) {
56 fPrime.accumulate(_fcn[i]->partial(index));
57 }
58 return Derivative(&fPrime);
59}
Derivative partial(unsigned int) const override
Definition: Sigma.cc:53
FunctionNoop Derivative
Definition: AbsFunction.hh:42

Referenced by partial().


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