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 namespace Genfun // due to CLHEP
13 {
14  namespace GaudiMathImplementation
15  {
23  class GAUDI_API Constant: public AbsFunction
24  {
25  public:
26 
28  FUNCTION_OBJECT_DEF( Constant )
29 
30  public:
31 
36  Constant ( const double value ,
37  const size_t dim ) ;
38 
40  Constant ( const Constant& right ) ;
41 
43  virtual ~Constant();
44 
45  public:
46 
48  virtual unsigned int dimensionality () const { return m_DIM ; }
50  virtual bool hasAnalyticDerivative () const { return true ; }
52  virtual double operator() ( double ) const { return m_value ; }
54  virtual double operator() ( const Argument& ) const { return m_value ; }
56  virtual Derivative partial ( unsigned int i ) const ;
57 
58  private:
59 
60  // the default constructor is disabled
61  Constant() ;
62  // the assignement operator is disabled
63  Constant& operator=( const Constant& );
64 
65  private:
66 
67  double m_value ;
68  size_t m_DIM ;
69 
70  };
71 
72  } // end of namespace GaudiMathImplementation
73 } // end of namespace Genfun
74 
75 // ============================================================================
76 // The END
77 // ============================================================================
78 #endif // GAUDIMATH_CONSTANT_H
79 // ============================================================================
Fixed constant function.
Definition: Constant.h:23
virtual unsigned int dimensionality() const
dimensionality of the problem
Definition: Constant.h:48
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:29
virtual bool hasAnalyticDerivative() const
Does this function have an analytic derivative?
Definition: Constant.h:50
CLHEP.
Definition: IEqSolver.h:13
#define GAUDI_API
Definition: Kernel.h:107
list i
Definition: ana.py:128
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27