20#ifndef CCGSL_SF_LEGENDRE_HPP
21#define CCGSL_SF_LEGENDRE_HPP
23#include<gsl/gsl_sf_legendre.h>
66 return gsl_sf_legendre_Pl_e( l, x, &
result ); }
74 inline double Pl(
int const l,
double const x ){
75 return gsl_sf_legendre_Pl( l, x ); }
85 inline int Pl_array(
int const lmax,
double const x,
double* result_array ){
86 return gsl_sf_legendre_Pl_array( lmax, x, result_array ); }
96 template<typename DATA>
97 inline int Pl_array(
int const lmax,
double const x, DATA& result_array ){
98 if(result_array.size() <
static_cast<size_t>(lmax + 1)){
return GSL_EBADLEN; }
99 return gsl_sf_legendre_Pl_array( lmax, x, result_array.data() ); }
111 double* result_array,
double* result_deriv_array ){
112 return gsl_sf_legendre_Pl_deriv_array( lmax, x, result_array,
113 result_deriv_array ); }
124 template<typename DATA>
126 DATA& result_array, DATA& result_deriv_array ){
127 if(result_array.size() <
static_cast<size_t>(lmax + 1)){
return GSL_EBADLEN; }
128 if(result_deriv_array.size() <
static_cast<size_t>(lmax + 1)){
return GSL_EBADLEN; }
129 return gsl_sf_legendre_Pl_deriv_array( lmax, x, result_array.data(),
130 result_deriv_array.data() ); }
139 return gsl_sf_legendre_P1_e( x, &
result ); }
148 return gsl_sf_legendre_P2_e( x, &
result ); }
157 return gsl_sf_legendre_P3_e( x, &
result ); }
164 inline double P1(
double const x ){
return gsl_sf_legendre_P1( x ); }
171 inline double P2(
double const x ){
return gsl_sf_legendre_P2( x ); }
178 inline double P3(
double const x ){
return gsl_sf_legendre_P3( x ); }
187 return gsl_sf_legendre_Q0_e( x, &
result ); }
194 inline double Q0(
double const x ){
return gsl_sf_legendre_Q0( x ); }
203 return gsl_sf_legendre_Q1_e( x, &
result ); }
210 inline double Q1(
double const x ){
return gsl_sf_legendre_Q1( x ); }
220 return gsl_sf_legendre_Ql_e( l, x, &
result ); }
228 inline double Ql(
int const l,
double const x ){
return gsl_sf_legendre_Ql( l, x ); }
252 return gsl_sf_legendre_Plm_e( l, m, x, &
result ); }
274 inline double Plm(
int const l,
int const m,
double const x ){
275 return gsl_sf_legendre_Plm( l, m, x ); }
287 inline int Plm_array(
int const lmax,
int const m,
double const x,
double* result_array ){
288 return gsl_sf_legendre_Plm_array( lmax, m, x, result_array ); }
300 template<typename DATA>
301 inline int Plm_array(
int const lmax,
int const m,
double const x, DATA& result_array ){
302 if(result_array.size() <
static_cast<size_t>(lmax + 1)){
return GSL_EBADLEN; }
303 return gsl_sf_legendre_Plm_array( lmax, m, x, result_array.data() ); }
316 inline int Plm_deriv_array(
int const lmax,
int const m,
double const x,
317 double* result_array,
double* result_deriv_array ){
318 return gsl_sf_legendre_Plm_deriv_array( lmax, m, x, result_array,
319 result_deriv_array ); }
332 template<typename DATA>
334 DATA& result_array, DATA& result_deriv_array ){
335 if(result_array.size() <
static_cast<size_t>(lmax + 1)){
return GSL_EBADLEN; }
336 if(result_deriv_array.size() <
static_cast<size_t>(lmax + 1)){
return GSL_EBADLEN; }
337 return gsl_sf_legendre_Plm_deriv_array( lmax, m, x, result_array.data(),
338 result_deriv_array.data() ); }
357 return gsl_sf_legendre_sphPlm_e( l, m, x, &
result ); }
374 inline double sphPlm(
int const l,
int const m,
double const x ){
375 return gsl_sf_legendre_sphPlm( l, m, x ); }
389 inline int sphPlm_array(
int const lmax,
int m,
double const x,
double* result_array ){
390 return gsl_sf_legendre_sphPlm_array( lmax, m, x, result_array ); }
403 inline int sphPlm_deriv_array(
int const lmax,
int const m,
double const x,
404 double* result_array,
double* result_deriv_array ){
405 return gsl_sf_legendre_sphPlm_deriv_array( lmax, m, x, result_array, result_deriv_array ); }
415 inline int array_size( int const lmax, int const m ){
416 return gsl_sf_legendre_array_size( lmax, m ); }
430 return gsl_sf_conicalP_half_e( lambda, x, &
result ); }
442 return gsl_sf_conicalP_half( lambda, x ); }
455 return gsl_sf_conicalP_mhalf_e( lambda, x, &
result ); }
467 return gsl_sf_conicalP_mhalf( lambda, x ); }
480 return gsl_sf_conicalP_0_e( lambda, x, &
result ); }
491 inline double conicalP_0(
double const lambda,
double const x ){
492 return gsl_sf_conicalP_0( lambda, x ); }
505 return gsl_sf_conicalP_1_e( lambda, x, &
result ); }
516 inline double conicalP_1(
double const lambda,
double const x ){
517 return gsl_sf_conicalP_1( lambda, x ); }
531 return gsl_sf_conicalP_sph_reg_e( l, lambda, x, &
result ); }
544 return gsl_sf_conicalP_sph_reg( l, lambda, x ); }
558 return gsl_sf_conicalP_cyl_reg_e( m, lambda, x, &
result ); }
571 return gsl_sf_conicalP_cyl_reg( m, lambda, x ); }
590 return gsl_sf_legendre_H3d_0_e( lambda,
eta, &
result ); }
606 inline double H3d_0(
double const lambda,
double const eta ){
607 return gsl_sf_legendre_H3d_0( lambda,
eta ); }
627 return gsl_sf_legendre_H3d_1_e( lambda,
eta, &
result ); }
645 inline double H3d_1(
double const lambda,
double const eta ){
646 return gsl_sf_legendre_H3d_1( lambda,
eta ); }
663 return gsl_sf_legendre_H3d_e( l, lambda,
eta, &
result ); }
678 inline double H3d(
int const l,
double const lambda,
double const eta ){
679 return gsl_sf_legendre_H3d( l, lambda,
eta ); }
690 inline int H3d_array(
int const lmax,
double const lambda,
double const eta,
691 double* result_array ){
692 return gsl_sf_legendre_H3d_array( lmax, lambda,
eta, result_array ); }
703 template<typename DATA>
704 inline int H3d_array(
int const lmax,
double const lambda,
double const eta,
705 DATA& result_array ){
706 if(result_array.size() <
static_cast<size_t>(lmax + 1)){
return GSL_EBADLEN; }
707 return gsl_sf_legendre_H3d_array( lmax, lambda,
eta, result_array.data() ); }
718 size_t const lmax,
double const x,
719 double* result_array ){
720 return gsl_sf_legendre_array( norm, lmax, x, result_array ); }
730 template<typename DATA>
732 size_t const lmax,
double const x,
733 DATA& result_array ){
734 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
735 return gsl_sf_legendre_array( norm, lmax, x, result_array.data() ); }
747 double const csphase,
double* result_array ){
748 return gsl_sf_legendre_array_e( norm, lmax, x, csphase, result_array ); }
759 template<typename DATA>
761 double const csphase, DATA& result_array ){
762 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
763 return gsl_sf_legendre_array_e( norm, lmax, x, csphase, result_array.data() ); }
775 double* result_array,
double* result_deriv_array ){
776 return gsl_sf_legendre_deriv_array( norm, lmax, x, result_array,
777 result_deriv_array ); }
788 template<typename DATA>
790 DATA& result_array, DATA& result_deriv_array ){
791 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
792 if(result_deriv_array.size() < lmax + 1){
return GSL_EBADLEN; }
793 return gsl_sf_legendre_deriv_array( norm, lmax, x, result_array.data(),
794 result_deriv_array.data() ); }
807 double const csphase,
double* result_array,
808 double* result_deriv_array ){
809 return gsl_sf_legendre_deriv_array_e( norm, lmax, x, csphase, result_array,
810 result_deriv_array ); }
822 template<typename DATA>
824 double const csphase, DATA& result_array,
825 DATA& result_deriv_array ){
826 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
827 if(result_deriv_array.size() < lmax + 1){
return GSL_EBADLEN; }
828 return gsl_sf_legendre_deriv_array_e( norm, lmax, x, csphase, result_array.data(),
829 result_deriv_array.data() ); }
841 double* result_array,
double* result_deriv_array ){
842 return gsl_sf_legendre_deriv_alt_array( norm, lmax, x, result_array,
843 result_deriv_array ); }
854 template<typename DATA>
856 DATA& result_array, DATA& result_deriv_array ){
857 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
858 if(result_deriv_array.size() < lmax + 1){
return GSL_EBADLEN; }
859 return gsl_sf_legendre_deriv_alt_array( norm, lmax, x, result_array.data(),
860 result_deriv_array.data() ); }
873 double const csphase,
double* result_array,
874 double* result_deriv_array ){
875 return gsl_sf_legendre_deriv_alt_array_e( norm, lmax, x, csphase, result_array,
876 result_deriv_array ); }
888 template<typename DATA>
890 double const csphase, DATA& result_array,
891 DATA& result_deriv_array ){
892 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
893 if(result_deriv_array.size() < lmax + 1){
return GSL_EBADLEN; }
894 return gsl_sf_legendre_deriv_alt_array_e( norm, lmax, x, csphase, result_array.data(),
895 result_deriv_array.data() ); }
908 double* result_array,
double* result_deriv_array,
909 double* result_deriv2_array ){
910 return gsl_sf_legendre_deriv2_array( norm, lmax, x, result_array, result_deriv_array,
911 result_deriv2_array ); }
923 template<typename DATA>
925 DATA& result_array, DATA& result_deriv_array,
926 DATA& result_deriv2_array ){
927 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
928 if(result_deriv_array.size() < lmax + 1){
return GSL_EBADLEN; }
929 if(result_deriv2_array.size() < lmax + 1){
return GSL_EBADLEN; }
930 return gsl_sf_legendre_deriv2_array( norm, lmax, x, result_array.data(),
931 result_deriv_array.data(),
932 result_deriv2_array.data() ); }
946 double const csphase,
double* result_array,
947 double* result_deriv_array,
double* result_deriv2_array ){
948 return gsl_sf_legendre_deriv2_array_e( norm, lmax, x, csphase, result_array,
949 result_deriv_array, result_deriv2_array ); }
962 template<typename DATA>
964 double const csphase, DATA& result_array,
965 DATA& result_deriv_array, DATA& result_deriv2_array ){
966 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
967 if(result_deriv_array.size() < lmax + 1){
return GSL_EBADLEN; }
968 if(result_deriv2_array.size() < lmax + 1){
return GSL_EBADLEN; }
969 return gsl_sf_legendre_deriv2_array_e( norm, lmax, x, csphase, result_array.data(),
970 result_deriv_array.data(),
971 result_deriv2_array.data() ); }
984 double* result_array,
double* result_deriv_array,
985 double* result_deriv2_array ){
986 return gsl_sf_legendre_deriv2_alt_array( norm, lmax, x, result_array,
987 result_deriv_array, result_deriv2_array ); }
999 template<typename DATA>
1001 DATA& result_array, DATA& result_deriv_array,
1002 DATA& result_deriv2_array ){
1003 return gsl_sf_legendre_deriv2_alt_array( norm, lmax, x, result_array.data(),
1004 result_deriv_array.data(),
1005 result_deriv2_array.data() ); }
1019 double const csphase,
double* result_array,
1020 double* result_deriv_array,
double* result_deriv2_array ){
1021 return gsl_sf_legendre_deriv2_alt_array_e( norm, lmax, x, csphase, result_array,
1023 result_deriv2_array ); }
1036 template<typename DATA>
1038 double const csphase, DATA& result_array,
1039 DATA& result_deriv_array, DATA& result_deriv2_array ){
1040 if(result_array.size() < lmax + 1){
return GSL_EBADLEN; }
1041 if(result_deriv_array.size() < lmax + 1){
return GSL_EBADLEN; }
1042 if(result_deriv2_array.size() < lmax + 1){
return GSL_EBADLEN; }
1043 return gsl_sf_legendre_deriv2_alt_array_e( norm, lmax, x, csphase, result_array.data(),
1044 result_deriv_array.data(),
1045 result_deriv2_array.data() ); }
1051 inline size_t array_n(
size_t const lmax ){
return gsl_sf_legendre_array_n( lmax ); }
1059 return gsl_sf_legendre_array_index( l, m ); }
1065 inline size_t nlm(
size_t const lmax ){
return gsl_sf_legendre_nlm( lmax ); }
double H3d_1(double const lambda, double const eta)
C++ version of gsl_sf_legendre_H3d_1().
double Q0(double const x)
C++ version of gsl_sf_legendre_Q0().
int H3d_1_e(double const lambda, double const eta, result &result)
C++ version of gsl_sf_legendre_H3d_1_e().
size_t array_index(size_t const l, size_t const m)
C++ version of gsl_sf_legendre_array_index().
int Pl_e(int const l, double const x, result &result)
C++ version of gsl_sf_legendre_Pl_e().
legendre_t const SCHMIDT()
Type.
double Ql(int const l, double const x)
C++ version of gsl_sf_legendre_Ql().
double P1(double const x)
C++ version of gsl_sf_legendre_P1().
int deriv2_array(legendre_t const norm, size_t const lmax, double const x, DATA &result_array, DATA &result_deriv_array, DATA &result_deriv2_array)
C++ version of gsl_sf_legendre_deriv2_array().
int Q0_e(double const x, result &result)
C++ version of gsl_sf_legendre_Q0_e().
legendre_t const SPHARM()
Type.
gsl_sf_legendre_t legendre_t
Alias.
double sphPlm(int const l, int const m, double const x)
C++ version of gsl_sf_legendre_sphPlm().
int Ql_e(int const l, double const x, result &result)
C++ version of gsl_sf_legendre_Ql_e().
int H3d_array(int const lmax, double const lambda, double const eta, DATA &result_array)
C++ version of gsl_sf_legendre_H3d_array().
int array_e(legendre_t const norm, size_t const lmax, double const x, double const csphase, DATA &result_array)
C++ version of gsl_sf_legendre_array_e().
int deriv2_array_e(legendre_t const norm, size_t const lmax, double const x, double const csphase, DATA &result_array, DATA &result_deriv_array, DATA &result_deriv2_array)
C++ version of gsl_sf_legendre_deriv2_array_e().
int H3d_e(int const l, double const lambda, double const eta, result &result)
C++ version of gsl_sf_legendre_H3d_e().
legendre_t const NONE()
Type.
size_t array_n(size_t const lmax)
C++ version of gsl_sf_legendre_array_n().
int deriv2_alt_array(legendre_t const norm, size_t const lmax, double const x, DATA &result_array, DATA &result_deriv_array, DATA &result_deriv2_array)
C++ version of gsl_sf_legendre_deriv2_alt_array().
int P2_e(double x, result &result)
C++ version of gsl_sf_legendre_P2_e().
int sphPlm_e(int const l, int m, double const x, result &result)
C++ version of gsl_sf_legendre_sphPlm_e().
int H3d_0_e(double const lambda, double const eta, result &result)
C++ version of gsl_sf_legendre_H3d_0_e().
int array(legendre_t const norm, size_t const lmax, double const x, DATA &result_array)
C++ version of gsl_sf_legendre_array().
int deriv_array(legendre_t const norm, size_t const lmax, double const x, DATA &result_array, DATA &result_deriv_array)
C++ version of gsl_sf_legendre_deriv_array().
double Q1(double const x)
C++ version of gsl_sf_legendre_Q1().
int deriv_array_e(legendre_t const norm, size_t const lmax, double const x, double const csphase, DATA &result_array, DATA &result_deriv_array)
C++ version of gsl_sf_legendre_deriv_array_e().
legendre_t const FULL()
Type.
int deriv_alt_array(legendre_t const norm, size_t const lmax, double const x, DATA &result_array, DATA &result_deriv_array)
C++ version of gsl_sf_legendre_deriv_alt_array().
int P1_e(double x, result &result)
C++ version of gsl_sf_legendre_P1_e().
int deriv_alt_array_e(legendre_t const norm, size_t const lmax, double const x, double const csphase, DATA &result_array, DATA &result_deriv_array)
C++ version of gsl_sf_legendre_deriv_alt_array_e().
double Plm(int const l, int const m, double const x)
C++ version of gsl_sf_legendre_Plm().
size_t nlm(size_t const lmax)
C++ version of gsl_sf_legendre_nlm().
double P3(double const x)
C++ version of gsl_sf_legendre_P3().
int Plm_deriv_array(int const lmax, int const m, double const x, DATA &result_array, DATA &result_deriv_array)
C++ version of gsl_sf_legendre_Plm_deriv_array().
int Plm_array(int const lmax, int const m, double const x, DATA &result_array)
C++ version of gsl_sf_legendre_Plm_array().
double P2(double const x)
C++ version of gsl_sf_legendre_P2().
double H3d_0(double const lambda, double const eta)
C++ version of gsl_sf_legendre_H3d_0().
int deriv2_alt_array_e(legendre_t const norm, size_t const lmax, double const x, double const csphase, DATA &result_array, DATA &result_deriv_array, DATA &result_deriv2_array)
C++ version of gsl_sf_legendre_deriv2_alt_array_e().
double H3d(int const l, double const lambda, double const eta)
C++ version of gsl_sf_legendre_H3d().
int Pl_deriv_array(int const lmax, double const x, DATA &result_array, DATA &result_deriv_array)
C++ version of gsl_sf_legendre_Pl_deriv_array().
int Pl_array(int const lmax, double const x, DATA &result_array)
C++ version of gsl_sf_legendre_Pl_array().
double Pl(int const l, double const x)
C++ version of gsl_sf_legendre_Pl().
int P3_e(double x, result &result)
C++ version of gsl_sf_legendre_P3_e().
int Q1_e(double const x, result &result)
C++ version of gsl_sf_legendre_Q1_e().
int Plm_e(int const l, int const m, double const x, result &result)
C++ version of gsl_sf_legendre_Plm_e().
double conicalP_cyl_reg(int const m, double const lambda, double const x)
C++ version of gsl_sf_conicalP_cyl_reg().
int conicalP_0_e(double const lambda, double const x, result &result)
C++ version of gsl_sf_conicalP_0_e().
double eta(double const s)
C++ version of gsl_sf_eta().
int conicalP_sph_reg_e(int const l, double const lambda, double const x, result &result)
C++ version of gsl_sf_conicalP_sph_reg_e().
int conicalP_1_e(double const lambda, double const x, result &result)
C++ version of gsl_sf_conicalP_1_e().
int conicalP_half_e(double const lambda, double const x, result &result)
double conicalP_half(double const lambda, double const x)
C++ version of gsl_sf_conicalP_half().
double conicalP_mhalf(double const lambda, double const x)
C++ version of gsl_sf_conicalP_mhalf().
int conicalP_cyl_reg_e(int const m, double const lambda, double const x, result &result)
C++ version of gsl_sf_conicalP_cyl_reg_e().
int conicalP_mhalf_e(double const lambda, double const x, result &result)
C++ version of gsl_sf_conicalP_mhalf_e().
double conicalP_1(double const lambda, double const x)
C++ version of gsl_sf_conicalP_1().
double conicalP_0(double const lambda, double const x)
C++ version of gsl_sf_conicalP_0().
double conicalP_sph_reg(int const l, double const lambda, double const x)
C++ version of gsl_sf_conicalP_sph_reg().
gsl_sf_result result
Typedef for gsl_sf_result.
The gsl package creates an interface to the GNU Scientific Library for C++.