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

#include <ArrayFunction.hh>

+ Inheritance diagram for Genfun::ArrayFunction:

Public Member Functions

 ArrayFunction (const double *begin, const double *end)
 
virtual ~ArrayFunction ()
 
 ArrayFunction (const ArrayFunction &right)
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) 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

Definition at line 14 of file ArrayFunction.hh.

Constructor & Destructor Documentation

◆ ArrayFunction() [1/2]

Genfun::ArrayFunction::ArrayFunction ( const double begin,
const double end 
)

Definition at line 13 of file ArrayFunction.cc.

13 :
14 _values(begin,end) {}

◆ ~ArrayFunction()

Genfun::ArrayFunction::~ArrayFunction ( )
virtual

Definition at line 17 of file ArrayFunction.cc.

17{}

◆ ArrayFunction() [2/2]

Genfun::ArrayFunction::ArrayFunction ( const ArrayFunction right)

Definition at line 20 of file ArrayFunction.cc.

20 :
21 AbsFunction(right), _values(right._values) {}

Member Function Documentation

◆ operator()() [1/2]

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

Implements Genfun::AbsFunction.

Definition at line 31 of file ArrayFunction.hh.

31{return operator() (a[0]);}
virtual double operator()(double argument) const override

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 24 of file ArrayFunction.cc.

24 {
25 int i = int (argument+0.5);
26 if (i<0 || i>=int(_values.size())) return 0;
27 else return _values[i];
28}

Referenced by operator()().


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