| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Constant.h
Go to the documentation of this file.
1 #ifndef GAUDIMATH_CONSTANT_H
2 #define GAUDIMATH_CONSTANT_H 1
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 // CLHEP
7 // ============================================================================
8 #include "CLHEP/GenericFunctions/AbsFunction.hh"
9 // ============================================================================
10 #include "GaudiKernel/Kernel.h"
11
12 #if defined( __clang__ ) || defined( __CLING__ )
13 #pragma clang diagnostic push
14 #pragma clang diagnostic ignored "-Winconsistent-missing-override"
15 #elif defined( __GNUC__ ) && __GNUC__ >= 5
16 #pragma GCC diagnostic push
17 #pragma GCC diagnostic ignored "-Wsuggest-override"
18 #endif
19
20 namespace Genfun // due to CLHEP
21 {
22 namespace GaudiMathImplementation
23 {
31 class GAUDI_API Constant : public AbsFunction
32 {
33 public:
35 FUNCTION_OBJECT_DEF( Constant )
36
37 public:
42 Constant( const double value, const size_t dim );
43
45 unsigned int dimensionality() const override { return m_DIM; }
47 bool hasAnalyticDerivative() const override { return true; }
49 double operator()( double ) const override { return m_value; }
51 double operator()( const Argument& ) const override { return m_value; }
53 Derivative partial( unsigned int i ) const override;
54
55 // the assignement operator is disabled
56 Constant& operator=( const Constant& ) = delete;
57
58 private:
59 double m_value;
60 size_t m_DIM;
61 };
62
63 } // end of namespace GaudiMathImplementation
64 } // end of namespace Genfun
65
66 #if defined( __clang__ ) || defined( __CLING__ )
67 #pragma clang diagnostic pop
68 #elif defined( __GNUC__ ) && __GNUC__ >= 5
69 #pragma GCC diagnostic pop
70 #endif
71
72 // ============================================================================
73 // The END
74 // ============================================================================
75 #endif // GAUDIMATH_CONSTANT_H
76 // ============================================================================
Kernel.h
Genfun::GaudiMathImplementation::Constant
Fixed constant function.
Definition: Constant.h:31
GaudiMath::Derivative
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:27
operator=
PropertyMgr & operator=(const PropertyMgr &)=delete
Genfun::GaudiMathImplementation::Constant::m_DIM
size_t m_DIM
Definition: Constant.h:60
Genfun::GaudiMathImplementation::Constant::operator()
double operator()(double) const override
Function value.
Definition: Constant.h:49
Genfun::GaudiMathImplementation::Constant::hasAnalyticDerivative
bool hasAnalyticDerivative() const override
Does this function have an analytic derivative?
Definition: Constant.h:47
Genfun::GaudiMathImplementation::Constant::m_value
double m_value
Definition: Constant.h:59
Genfun::GaudiMathImplementation::Constant::operator()
double operator()(const Argument &) const override
Function value.
Definition: Constant.h:51
Genfun
CLHEP.
Definition: IEqSolver.h:13
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26
Genfun::GaudiMathImplementation::Constant::dimensionality
unsigned int dimensionality() const override
dimensionality of the problem
Definition: Constant.h:45