00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef Power_h
00011 #define Power_h 1
00012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00013 namespace Genfun {
00014
00019 class Power : public AbsFunction {
00020
00021 FUNCTION_OBJECT_DEF(Power)
00022
00023 public:
00024
00025
00026 Power(double n);
00027 Power(int n);
00028 Power(unsigned int n);
00029
00030
00031 Power(const Power &right);
00032
00033
00034 virtual ~Power();
00035
00036
00037
00038 virtual double operator ()(double argument) const;
00039 virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
00040
00041
00042 Derivative partial (unsigned int) const;
00043
00044
00045 virtual bool hasAnalyticDerivative() const {return true;}
00046
00047 private:
00048
00049
00050 const Power & operator=(const Power &right);
00051
00052 double _doublePower;
00053 int _intPower;
00054 bool _asInteger;
00055
00056 };
00057 }
00058 #endif