CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

CLHEP/GenericFunctions/InterpolatingPolynomial.hh
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id:
3 // ------------------------------------------------------------------------------//
4 // Lagrange's Interpolating Polynomial //
5 // //
6 // //
7 // Joe Boudreau. //
8 // //
9 // ------------------------------------------------------------------------------//
10 #ifndef _InterpolatingPolynomial_h_
11 #define _InterpolatingPolynomial_h_
14 #include <vector>
15 namespace Genfun {
16 
22 
24 
25  public:
26 
27  // Constructor
29 
30  // Copy constructor
32 
33  // Destructor:
34  virtual ~InterpolatingPolynomial();
35 
36  // Retreive function value
37  virtual double operator ()(double argument) const;
38  virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
39 
40  // Puncture this thing:
41  void addPoint(double x, double y);
42 
43  // Get the range:
44  void getRange(double & min, double & max) const;
45 
46  private:
47 
48  // It is illegal to assign an adjustable constant
49  const InterpolatingPolynomial & operator=(const InterpolatingPolynomial &right);
50 
51  std::vector<std::pair<double,double> > xPoints;
52  };
53 } // namespace Genfun
54 #endif
#define FUNCTION_OBJECT_DEF(classname)
void getRange(double &min, double &max) const
virtual double operator()(double argument) const
@ a