3 #include "gsl/gsl_sf_ellint.h" 10 namespace EllipticIntegral {
16 FUNCTION_OBJECT_IMP(FirstKind)
19 FirstKind::FirstKind():
25 FirstKind::~FirstKind() {
29 FirstKind::FirstKind(
const FirstKind & right):
36 Parameter & FirstKind::k() {
41 const Parameter & FirstKind::k()
const {
47 double FirstKind::operator() (
double x)
const {
49 int status = gsl_sf_ellint_F_e(x,_k.getValue(), GSL_PREC_DOUBLE, &result);
51 std::cerr <<
"Warning, GSL function gsl_sf_ellint_F_impl" 52 <<
" return code" << status << std::endl;
61 FUNCTION_OBJECT_IMP(SecondKind)
64 SecondKind::SecondKind():
70 SecondKind::~SecondKind() {
74 SecondKind::SecondKind(
const SecondKind & right):
81 Parameter & SecondKind::k() {
86 const Parameter & SecondKind::k()
const {
92 double SecondKind::operator() (
double x)
const {
94 int status = gsl_sf_ellint_E_e(x,_k.getValue(), GSL_PREC_DOUBLE, &result);
96 std::cerr <<
"Warning, GSL function gsl_sf_ellint_E_impl" 97 <<
" return code" << status << std::endl;
105 FUNCTION_OBJECT_IMP(ThirdKind)
108 ThirdKind::ThirdKind():
109 _k(
"K", 1.0,0.0, 1.0),
110 _n(
"N", 1.0,0.0,10.0)
115 ThirdKind::~ThirdKind() {
119 ThirdKind::ThirdKind(
const ThirdKind & right):
127 Parameter & ThirdKind::k() {
132 const Parameter & ThirdKind::k()
const {
138 Parameter & ThirdKind::n() {
143 const Parameter & ThirdKind::n()
const {
149 double ThirdKind::operator() (
double x)
const {
150 gsl_sf_result result;
151 int status = gsl_sf_ellint_P_e(x,_k.getValue(),_n.getValue(), GSL_PREC_DOUBLE, &result);
153 std::cerr <<
"Warning, GSL function gsl_ellint_P_impl" 154 <<
" return code" << status << std::endl;