CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: 00003 // ------------------------------------------------------------------------------// 00004 // Natural cubic spline function, used for interpolation // 00005 // // 00006 // // 00007 // Joe Boudreau. // 00008 // // 00009 // ------------------------------------------------------------------------------// 00010 #ifndef _CubicSplinePolynomial_h_ 00011 #define _CubicSplinePolynomial_h_ 00012 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00013 #include "CLHEP/GenericFunctions/Parameter.hh" 00014 #include <vector> 00015 namespace Genfun { 00016 00021 class CubicSplinePolynomial: public AbsFunction { 00022 00023 FUNCTION_OBJECT_DEF(CubicSplinePolynomial) 00024 00025 public: 00026 00027 // Constructor 00028 CubicSplinePolynomial(); 00029 00030 // Copy constructor 00031 CubicSplinePolynomial(const CubicSplinePolynomial &right); 00032 00033 // Destructor: 00034 virtual ~CubicSplinePolynomial(); 00035 00036 // Retreive function value 00037 virtual double operator ()(double argument) const; 00038 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00039 00040 // Puncture this thing: 00041 void addPoint(double x, double y); 00042 00043 // Get the range: 00044 void getRange(double & min, double & max) const; 00045 00046 private: 00047 00048 // It is illegal to assign an adjustable constant 00049 const CubicSplinePolynomial & operator=(const CubicSplinePolynomial &right); 00050 00051 class Clockwork; 00052 Clockwork *c; 00053 00054 }; 00055 } // namespace Genfun 00056 #include "CLHEP/GenericFunctions/CubicSplinePolynomial.icc" 00057 #endif