18 #ifndef JACOBI_ELLIPTIC_FUNCTIONS_H_
19 #define JACOBI_ELLIPTIC_FUNCTIONS_H_
26 #if defined HAVE_ARPREC && defined USE_GPL_SHOGUN
27 #include <arprec/mp_real.h>
28 #include <arprec/mp_complex.h>
29 #endif //(HAVE_ARPREC && USE_GPL_SHOGUN)
57 #if defined HAVE_ARPREC && defined USE_GPL_SHOGUN
59 typedef mp_complex Complex;
63 #endif //(HAVE_ARPREC && USE_GPL_SHOGUN)
65 static inline Real compute_quarter_period(Real b)
67 #if defined HAVE_ARPREC && defined USE_GPL_SHOGUN
68 const Real eps=mp_real::_eps;
69 const Real pi=mp_real::_pi;
71 const Real eps=std::numeric_limits<Real>::epsilon();
73 #endif //(HAVE_ARPREC && USE_GPL_SHOGUN)
91 static inline Real poly_six(Real x)
93 return (132*pow(x,6)+42*pow(x,5)+14*pow(x,4)+5*pow(x,3)+2*pow(x,2)+x);
104 static void ellipKKp(Real L, Real &K, Real &Kp);
114 static void ellipJC(Complex u, Real m, Complex &sn, Complex &cn,
117 #if defined HAVE_ARPREC && defined USE_GPL_SHOGUN
126 mp::mp_init(100, NULL,
true);
144 mp::mp_init(100, NULL,
true);
145 mp_complex _sn, _cn, _dn;
146 ellipJC(mp_complex(u.real(),u.imag()), mp_real(m), _sn, _cn, _dn);
152 #endif //(HAVE_ARPREC && USE_GPL_SHOGUN)
157 return "JacobiEllipticFunctions";
std::complex< float64_t > complex128_t
static void ellipKKp(Real L, Real &K, Real &Kp)
static void ellipJC(Complex u, Real m, Complex &sn, Complex &cn, Complex &dn)
Class SGObject is the base class of all shogun objects.
#define M_PI
workaround for log2 being a define on cygwin
all of classes and functions are contained in the shogun namespace
virtual const char * get_name() const
Class that contains methods for computing Jacobi elliptic functions related to complex analysis...