00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _ENL_INTERP_H_
00011 #define _ENL_INTERP_H_
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 const int ENL_CSPLINE_LINEAR = 1;
00022 const int ENL_CSPLINE_PARABOLIC = 2;
00023 const int ENL_CSPLINE_CUBIC = 3;
00024 const int ENL_CSPLINE_FDEV = 4;
00025
00026
00027 class enl_interp {
00028
00029
00030 int m_iend;
00031
00032
00033 double* m_dd;
00034
00035
00036 double* m_a;
00037 double* m_b;
00038 double* m_c;
00039
00040
00041 double* m_x;
00042 double* m_y;
00043 int m_n;
00044
00045
00046 bool m_cspline;
00047 bool m_divdiff;
00048
00049 void divdiff_coef();
00050 void cspline_coef();
00051
00052 public:
00053 enl_interp(const double* x, const double* y, const int& n);
00054 ~enl_interp();
00055
00056 double lagrange ( const double& u );
00057 double divdiff ( const double& u );
00058 double cspline ( const double& u, int* store);
00059
00060
00061 };
00062
00063 #endif