Constant.h
Go to the documentation of this file.00001
00002
00003 #ifndef GAUDIMATH_CONSTANT_H
00004 #define GAUDIMATH_CONSTANT_H 1
00005
00006
00007
00008
00009
00010 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00011
00012 #include "GaudiKernel/Kernel.h"
00013
00014 namespace Genfun
00015 {
00016 namespace GaudiMathImplementation
00017 {
00025 class GAUDI_API Constant: public AbsFunction
00026 {
00027 public:
00028
00030 FUNCTION_OBJECT_DEF( Constant )
00031
00032 public:
00033
00038 Constant ( const double value ,
00039 const size_t dim ) ;
00040
00042 Constant ( const Constant& right ) ;
00043
00045 virtual ~Constant();
00046
00047 public:
00048
00050 virtual unsigned int dimensionality () const { return m_DIM ; }
00052 virtual bool hasAnalyticDerivative () const { return true ; }
00054 virtual double operator() ( double ) const { return m_value ; }
00056 virtual double operator() ( const Argument& ) const { return m_value ; }
00058 virtual Derivative partial ( unsigned int i ) const ;
00059
00060 private:
00061
00062
00063 Constant() ;
00064
00065 Constant& operator=( const Constant& );
00066
00067 private:
00068
00069 double m_value ;
00070 size_t m_DIM ;
00071
00072 };
00073
00074 }
00075 }
00076
00077
00078
00079
00080 #endif // GAUDIMATH_CONSTANT_H
00081