00001 00031 #ifndef _adevs_poly_h_ 00032 #define _adevs_poly_h_ 00033 #include <cstdlib> 00034 00035 namespace adevs 00036 { 00047 class InterPoly 00048 { 00049 public: 00056 InterPoly(const double* u, const double* t, unsigned int n); 00061 InterPoly(const double* u, double dt, unsigned int n, double t0 = 0.0); 00067 void setData(const double* u, const double* t = NULL); 00071 double interpolate(double t) const; 00075 double operator()(double t) const; 00079 double derivative(double t) const; 00083 ~InterPoly(); 00084 private: 00085 InterPoly(){} 00086 InterPoly(const InterPoly&){} 00087 void operator=(const InterPoly&){} 00088 00089 double* tdat; 00090 double* udat; 00091 unsigned int n; 00092 }; 00093 } 00094 00095 #endif