00001 #ifndef __CHEBYSHEV_POLY_EXPANSION_H__
00002 #define __CHEBYSHEV_POLY_EXPANSION_H__
00003
00004 #include "parametermap.h"
00005 #include "orthogfunc_expansion1d.h"
00006 #include "constants.h"
00007
00008 double chebyshev_polynomial( int i, double x );
00009
00010 class CChebyshevPolynomialExpansion1d: public COrthogonalFuncExpansion1d {
00011 public:
00012
00013
00014 CChebyshevPolynomialExpansion1d(int _l=0, int _m=0, bool r=true, int N=1, double _xmin=0., double _xmax=1.0):
00015 COrthogonalFuncExpansion1d( _l, _m, r, N, _xmin, _xmax ){}
00016 CChebyshevPolynomialExpansion1d(const CChebyshevPolynomialExpansion1d& h):
00017 COrthogonalFuncExpansion1d( h ){}
00018
00019
00020 ~CChebyshevPolynomialExpansion1d( void ){}
00021
00022
00023 bool Read(const parameterMap& m){return COrthogonalFuncExpansion1d::Read(m);}
00024 bool Write(parameterMap& m){return COrthogonalFuncExpansion1d::Write(m);}
00025
00026 double basisFunction(double x, int i, int jderiv=0) const;
00027 double basisFunctionInverse(double x, int i) const;
00028 double orthogFunctionValue(double x, int i, int jderiv=0) const;
00029 double weightFunction(double x, int jderiv=0) const;
00030 double normalization(int j) const{if (j==0) return PI; else return PI/2.0;}
00031 double xScale(void) const{return (xmax-xmin)/2.0;}
00032 double xShift(void) const{return (xmax+xmin)/(xmax-xmin);}
00033
00034
00035 void CopyState(const CChebyshevPolynomialExpansion1d& a)
00036 {COrthogonalFuncExpansion1d::CopyState(a);}
00037
00038
00039 double getLeftSupport(int i) const;
00040 double getRightSupport(int i) const;
00041
00042 };
00043
00044 #endif