File indexing completed on 2025-01-18 09:54:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _InterpolatingPolynomial_h_
0011 #define _InterpolatingPolynomial_h_
0012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0013 #include "CLHEP/GenericFunctions/Parameter.hh"
0014 #include <vector>
0015 namespace Genfun {
0016
0017
0018
0019
0020
0021 class InterpolatingPolynomial: public AbsFunction {
0022
0023 FUNCTION_OBJECT_DEF(InterpolatingPolynomial)
0024
0025 public:
0026
0027
0028 InterpolatingPolynomial();
0029
0030
0031 InterpolatingPolynomial(const InterpolatingPolynomial &right);
0032
0033
0034 virtual ~InterpolatingPolynomial();
0035
0036
0037 virtual double operator ()(double argument) const override;
0038 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0039
0040
0041 void addPoint(double x, double y);
0042
0043
0044 void getRange(double & min, double & max) const;
0045
0046 private:
0047
0048
0049 const InterpolatingPolynomial & operator=(const InterpolatingPolynomial &right);
0050
0051 std::vector<std::pair<double,double> > xPoints;
0052 };
0053 }
0054 #endif