00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "EvtGenBase/EvtPatches.hh"
00023
00024 #include "EvtGenModels/EvtItgPtrFunction.hh"
00025
00026
00027
00028
00029 extern "C" {
00030 }
00031
00032
00033
00034
00035 EvtItgPtrFunction::EvtItgPtrFunction( double (*theFunction)(double, const std::vector<double> &), double lowerRange, double upperRange, const std::vector<double> &coeffs1):
00036 EvtItgAbsFunction(lowerRange, upperRange),
00037 _myFunction(theFunction),
00038 _coeffs1(coeffs1)
00039 {}
00040
00041
00042
00043
00044
00045
00046 EvtItgPtrFunction::~EvtItgPtrFunction( )
00047 {}
00048
00049
00050 double
00051 EvtItgPtrFunction::myFunction(double x) const{
00052 return _myFunction(x, _coeffs1);
00053 }
00054
00055 void
00056 EvtItgPtrFunction::setCoeff(int vect, int which, double value)
00057 {
00058 if (vect == 1) _coeffs1[which] = value;
00059 }
00060
00061 double
00062 EvtItgPtrFunction::getCoeff(int vect, int which)
00063 {
00064 if (vect == 1) return _coeffs1[which];
00065 else {return 0;}
00066 }