CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
FunctionTimesParameter.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: FunctionTimesParameter.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
3#include "CLHEP/GenericFunctions/FunctionTimesParameter.hh"
4#include "CLHEP/GenericFunctions/Parameter.hh"
5
6namespace Genfun {
7FUNCTION_OBJECT_IMP(FunctionTimesParameter)
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
46
47
48
50 const AbsFunction & fPrime = (*_parameter)*(_function->partial(index));
51 return Derivative(&fPrime);
52}
53
54} // 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
Derivative partial(unsigned int) const override
virtual unsigned int dimensionality() const override
FunctionTimesParameter(const AbsParameter *parameter, const AbsFunction *function)
virtual double operator()(double argument) const override
Definition: Abs.hh:14
FunctionNoop Derivative
Definition: AbsFunction.hh:42