CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
FunctionPlusParameter.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: FunctionPlusParameter.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
3#include "CLHEP/GenericFunctions/FunctionPlusParameter.hh"
4#include "CLHEP/GenericFunctions/Parameter.hh"
5
6namespace Genfun {
7FUNCTION_OBJECT_IMP(FunctionPlusParameter)
8
10 _function(function->clone()),
11 _parameter(parameter->clone())
12{
13 if (parameter->parameter() && _parameter->parameter()) {
14 _parameter->parameter()->connectFrom(parameter->parameter());
15 }
16}
17
19 AbsFunction(right),
20 _function(right._function->clone()),
21 _parameter(right._parameter->clone())
22{}
23
25 return _function->dimensionality();
26}
27
29{
30 delete _function;
31 delete _parameter;
32}
33
34
36{
37 return _parameter->getValue() + (*_function)(x);
38}
39
40
42{
43 return _parameter->getValue() + (*_function)(x);
44}
45
46Derivative FunctionPlusParameter::partial(unsigned int index) const {
47 return _function->partial(index);
48}
49
50} // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Definition: AbsFunction.hh:149
virtual Derivative partial(unsigned int) const
Definition: AbsFunction.cc:40
virtual unsigned int dimensionality() const
Definition: AbsFunction.cc:79
virtual double getValue() const =0
FunctionPlusParameter(const AbsParameter *parameter, const AbsFunction *function)
virtual double operator()(double argument) const override
virtual unsigned int dimensionality() const override
Derivative partial(unsigned int) const override
Definition: Abs.hh:14