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

#include <ConstMinusFunction.hh>

+ Inheritance diagram for Genfun::ConstMinusFunction:

Public Member Functions

 ConstMinusFunction (double constant, const AbsFunction *arg)
 
 ConstMinusFunction (const ConstMinusFunction &right)
 
virtual ~ConstMinusFunction ()
 
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
 
- 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 20 of file ConstMinusFunction.hh.

Constructor & Destructor Documentation

◆ ConstMinusFunction() [1/2]

Genfun::ConstMinusFunction::ConstMinusFunction ( double  constant,
const AbsFunction arg 
)

Definition at line 9 of file ConstMinusFunction.cc.

9 :
10 _constant(constant),
11 _arg(arg->clone())
12{
13}

◆ ConstMinusFunction() [2/2]

Genfun::ConstMinusFunction::ConstMinusFunction ( const ConstMinusFunction right)

Definition at line 15 of file ConstMinusFunction.cc.

15 :
16AbsFunction(right),
17_constant(right._constant),
18_arg(right._arg->clone())
19{}

◆ ~ConstMinusFunction()

Genfun::ConstMinusFunction::~ConstMinusFunction ( )
virtual

Definition at line 25 of file ConstMinusFunction.cc.

26{
27 delete _arg;
28}

Member Function Documentation

◆ dimensionality()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 21 of file ConstMinusFunction.cc.

21 {
22 return _arg->dimensionality();
23}
virtual unsigned int dimensionality() const
Definition: AbsFunction.cc:79

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 46 of file ConstMinusFunction.hh.

46{return true;}

◆ operator()() [1/2]

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

Implements Genfun::AbsFunction.

Definition at line 38 of file ConstMinusFunction.cc.

39{
40 return _constant - (*_arg)(x);
41}

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 32 of file ConstMinusFunction.cc.

33{
34 return _constant - (*_arg)(x);
35}

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 44 of file ConstMinusFunction.cc.

44 {
45 const AbsFunction & fPrime = -_arg->partial(index);
46 return Derivative(& fPrime);
47}
virtual Derivative partial(unsigned int) const
Definition: AbsFunction.cc:40
FunctionNoop Derivative
Definition: AbsFunction.hh:42

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