00001 #include "laguerrepoly_expansion1d.h"
00002 #include <gsl/gsl_sf_legendre.h>
00003
00005 bool CLaguerrePolynomialExpansion1d::Read(const parameterMap& m){
00006 xscale = parameter::getD(m,"xscale",xscale);
00007 return COrthogonalFuncExpansion1d::Read(m);
00008 }
00009
00011 bool CLaguerrePolynomialExpansion1d::Write(parameterMap& m){
00012 parameter::set(m,"xscale",xscale);
00013 return COrthogonalFuncExpansion1d::Write(m);
00014 }
00015
00020 double CLaguerrePolynomialExpansion1d::orthogFunctionValue(double x, int i, int jderiv) const{
00021 if (jderiv==0) return gsl_sf_laguerre_n(i,0.0,x);
00022 if (jderiv==1) {
00023 if ( i==0 ) return 0.0;
00024 if ( x < 1e-10 ) x=1e-10;
00025 return ( double(i)/x )*( gsl_sf_laguerre_n( i, 0.0, x ) - gsl_sf_laguerre_n( i-1, 0.0, x ) );
00026 }
00027 MESSAGE << "Did not implement CLaguerrePolynomialExpansion1d::orthogFunctionValue for jderiv != 0 or 1"<<ENDM_WARN;
00028 return 0.0;
00029 }
00030
00031
00032
00033
00034 double CLaguerrePolynomialExpansion1d::getLeftSupport(int i) const{return xmin;}
00035 double CLaguerrePolynomialExpansion1d::getRightSupport(int i) const{return xmax;}