CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
FloatingConstant.hh
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: FloatingConstant.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3//----------------------FloatingConstant -----------------------------------//
4// //
5// Class FloatingConstant //
6// Joe Boudreau, Petar Maksimovic, Nov. 1999 //
7// //
8// FloatingConstant allows use to treat constants as floating-constant //
9// functions so that they automatically will inherit all the algebraic //
10// operations we have so painstakingly defined for functions. //
11// //
12//--------------------------------------------------------------------------//
13#ifndef FloatingConstant_h
14#define FloatingConstant_h 1
15#include "CLHEP/GenericFunctions/AbsFunction.hh"
16#include "CLHEP/GenericFunctions/Parameter.hh"
17
18namespace Genfun {
19
20 /**
21 * @author
22 * @ingroup genfun
23 */
25
27
28 public:
29
30 // Constructor
32
33 // Copy constructor
35
36 // Destructor
37 virtual ~FloatingConstant();
38
39 // Retrieve the parameter:
41
42 // Retrieve function value
43 virtual double operator ()(double argument) const override;
44 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
45
46 // Derivative.
47 Derivative partial (unsigned int) const override;
48
49 // Does this function have an analytic derivative?
50 virtual bool hasAnalyticDerivative() const override {return true;}
51
52 private:
53
54 // It is illegal to assign a fixed constant
55 const FloatingConstant & operator=(const FloatingConstant &right);
56
57 // The value of the constant:
58 AbsParameter *_value;
59 };
60} // namespace Genfun
61#endif
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
virtual bool hasAnalyticDerivative() const override
Derivative partial(unsigned int) const override
virtual double operator()(double argument) const override
Definition: Abs.hh:14