CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
FunctionSum.hh
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: FunctionSum.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3//--------------------------FunctionSum-------------------------------------//
4// //
5// FunctionSum, result of addition of two functions. //
6// Joe Boudreau, Petar Maksimovic, November 1999 //
7// //
8//--------------------------------------------------------------------------//
9
10#ifndef FunctionSum_h
11#define FunctionSum_h 1
12#include "CLHEP/GenericFunctions/AbsFunction.hh"
13
14namespace Genfun {
15
16 /**
17 * @author
18 * @ingroup genfun
19 */
20 class FunctionSum : public AbsFunction {
21
23
24 public:
25
26 // Constructor
27 FunctionSum(const AbsFunction *arg1, const AbsFunction *arg2);
28
29 // Copy constructor
30 FunctionSum(const FunctionSum &right);
31
32 // Destructor
33 virtual ~FunctionSum();
34
35 // Retreive function value
36 virtual double operator ()(double argument) const override;
37 virtual double operator ()(const Argument & a) const override;
38
39 // Dimensionality
40 virtual unsigned int dimensionality() const override;
41
42 // Derivative.
43 Derivative partial (unsigned int) const override;
44
45 // Does this function have an analytic derivative?
46 virtual bool hasAnalyticDerivative() const override {return true;}
47
48 private:
49
50 // It is illegal to assign a FunctionSum
51 const FunctionSum & operator=(const FunctionSum &right);
52
53 const AbsFunction *_arg1;
54 const AbsFunction *_arg2;
55 };
56} // namespace Genfun
57#endif
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
virtual ~FunctionSum()
Definition: FunctionSum.cc:32
virtual bool hasAnalyticDerivative() const override
Definition: FunctionSum.hh:46
virtual unsigned int dimensionality() const override
Definition: FunctionSum.cc:28
Derivative partial(unsigned int) const override
Definition: FunctionSum.cc:53
virtual double operator()(double argument) const override
Definition: FunctionSum.cc:40
Definition: Abs.hh:14