00001 #ifndef CHEBYSHEV_FIT_H 00002 #define CHEBYSHEV_FIT_H 00003 00004 #include "chebyshev.h" 00005 #include "tnt_array1d.h" 00006 #include "tnt_array2d.h" 00007 00008 using namespace TNT; 00009 00010 class CChebyshevDataFit: public CChebyshevApprox1D { 00011 00012 public: 00013 CChebyshevDataFit(void){RunQuiet();} 00014 ~CChebyshevDataFit(void){} 00015 00016 /* Error on fit */ 00017 double Error(double x) const; 00018 /* Set up chi2 fit*/ 00019 void ChiSquareFitCoeffs( 00020 const Array1D<double> &x, 00021 const Array1D<double> &y, 00022 const Array1D<double> &dy 00023 ); 00024 void ChiSquareFitCoeffs( 00025 const Array1D<double> &x, 00026 const Array1D<double> &y, 00027 const Array2D<double> &covy 00028 ); 00029 00030 private: 00031 Array2D<double> d2c; 00032 00033 }; 00034 00035 00036 #endif