Add Bessel functions to SpecialFunctions.

- Split SpecialFunctions files in to a separate BesselFunctions file.

In particular add:
    - Modified bessel functions of the second kind k0, k1, k0e, k1e
    - Bessel functions of the first kind j0, j1
    - Bessel functions of the second kind y0, y1
This commit is contained in:
Srinivas Vasudevan
2019-09-14 12:16:47 -04:00
parent facdec5aa7
commit 6e215cf109
23 changed files with 3427 additions and 548 deletions

View File

@@ -72,24 +72,6 @@ Packet pigammac(const Packet& a, const Packet& x) { using numext::igammac; retur
template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Packet pbetainc(const Packet& a, const Packet& b,const Packet& x) { using numext::betainc; return betainc(a, b, x); }
/** \internal \returns the exponentially scaled modified Bessel function of
* order zero i0e(\a a) (coeff-wise) */
template <typename Packet>
EIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet pi0e(const Packet& x) {
typedef typename unpacket_traits<Packet>::type ScalarType;
using internal::generic_i0e; return generic_i0e<Packet, ScalarType>::run(x);
}
/** \internal \returns the exponentially scaled modified Bessel function of
* order one i1e(\a a) (coeff-wise) */
template <typename Packet>
EIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet pi1e(const Packet& x) {
typedef typename unpacket_traits<Packet>::type ScalarType;
using internal::generic_i1e; return generic_i1e<Packet, ScalarType>::run(x);
}
} // end namespace internal
} // end namespace Eigen