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