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

#include <Sqrt.hh>

+ Inheritance diagram for Genfun::Sqrt:

Public Member Functions

 Sqrt ()
 
 Sqrt (const Sqrt &right)
 
virtual ~Sqrt ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) const override
 
Derivative partial (unsigned int) const override
 
virtual bool hasAnalyticDerivative () const override
 
- 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 Sqrt.hh.

Constructor & Destructor Documentation

◆ Sqrt() [1/2]

Genfun::Sqrt::Sqrt ( )

Definition at line 9 of file Sqrt.cc.

10{}

Referenced by partial().

◆ Sqrt() [2/2]

Genfun::Sqrt::Sqrt ( const Sqrt right)

Definition at line 12 of file Sqrt.cc.

12 : AbsFunction(right)
13{
14}

◆ ~Sqrt()

Genfun::Sqrt::~Sqrt ( )
virtual

Definition at line 16 of file Sqrt.cc.

16 {
17}

Member Function Documentation

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 42 of file Sqrt.hh.

42{return true;}

◆ operator()() [1/2]

virtual double Genfun::Sqrt::operator() ( const Argument a) const
inlineoverridevirtual

Implements Genfun::AbsFunction.

Definition at line 36 of file Sqrt.hh.

36{return operator() (a[0]);}
virtual double operator()(double argument) const override
Definition: Sqrt.cc:19

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 19 of file Sqrt.cc.

19 {
20 return sqrt(x);
21}

Referenced by operator()().

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 34 of file Sqrt.cc.

34 {
35 assert(index==0);
36 const AbsFunction & fPrime = (0.5)/Sqrt();
37 return Derivative(&fPrime);
38}
Sqrt()
Definition: Sqrt.cc:9
FunctionNoop Derivative
Definition: AbsFunction.hh:42

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