SpecialFunctionsHalf.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // This Source Code Form is subject to the terms of the Mozilla
5 // Public License v. 2.0. If a copy of the MPL was not distributed
6 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 
8 #ifndef EIGEN_SPECIALFUNCTIONS_HALF_H
9 #define EIGEN_SPECIALFUNCTIONS_HALF_H
10 
11 namespace Eigen {
12 namespace numext {
13 
14 #if EIGEN_HAS_C99_MATH
16  return Eigen::half(Eigen::numext::lgamma(static_cast<float>(a)));
17 }
19  return Eigen::half(Eigen::numext::digamma(static_cast<float>(a)));
20 }
22  return Eigen::half(Eigen::numext::zeta(static_cast<float>(x), static_cast<float>(q)));
23 }
25  return Eigen::half(Eigen::numext::polygamma(static_cast<float>(n), static_cast<float>(x)));
26 }
28  return Eigen::half(Eigen::numext::erf(static_cast<float>(a)));
29 }
31  return Eigen::half(Eigen::numext::erfc(static_cast<float>(a)));
32 }
34  return Eigen::half(Eigen::numext::ndtri(static_cast<float>(a)));
35 }
37  return Eigen::half(Eigen::numext::igamma(static_cast<float>(a), static_cast<float>(x)));
38 }
39 template <>
41  return Eigen::half(Eigen::numext::igamma_der_a(static_cast<float>(a), static_cast<float>(x)));
42 }
43 template <>
45  return Eigen::half(Eigen::numext::gamma_sample_der_alpha(static_cast<float>(alpha), static_cast<float>(sample)));
46 }
48  return Eigen::half(Eigen::numext::igammac(static_cast<float>(a), static_cast<float>(x)));
49 }
51  return Eigen::half(Eigen::numext::betainc(static_cast<float>(a), static_cast<float>(b), static_cast<float>(x)));
52 }
53 #endif
54 
55 } // end namespace numext
56 } // end namespace Eigen
57 
58 #endif // EIGEN_SPECIALFUNCTIONS_HALF_H
Eigen::numext::x
EIGEN_DEVICE_FUNC const Scalar & x
Definition: SpecialFunctionsImpl.h:1990
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::igamma_der_a
const EIGEN_STRONG_INLINE Eigen::CwiseBinaryOp< Eigen::internal::scalar_igamma_der_a_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igamma_der_a(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition: SpecialFunctionsArrayAPI.h:51
Eigen::betainc
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE TensorCwiseTernaryOp< internal::scalar_betainc_op< typename XDerived::Scalar >, const ADerived, const BDerived, const XDerived > betainc(const ADerived &a, const BDerived &b, const XDerived &x)
Definition: TensorGlobalFunctions.h:24
alpha
RealScalar alpha
Definition: level1_cplx_impl.h:147
Eigen::gamma_sample_der_alpha
const EIGEN_STRONG_INLINE Eigen::CwiseBinaryOp< Eigen::internal::scalar_gamma_sample_der_alpha_op< typename AlphaDerived::Scalar >, const AlphaDerived, const SampleDerived > gamma_sample_der_alpha(const Eigen::ArrayBase< AlphaDerived > &alpha, const Eigen::ArrayBase< SampleDerived > &sample)
Definition: SpecialFunctionsArrayAPI.h:72
digamma
const EIGEN_DEVICE_FUNC DigammaReturnType digamma() const
Definition: ArrayCwiseUnaryOps.h:637
n
int n
Definition: BiCGSTAB_simple.cpp:1
Eigen::polygamma
const EIGEN_STRONG_INLINE Eigen::CwiseBinaryOp< Eigen::internal::scalar_polygamma_op< typename DerivedX::Scalar >, const DerivedN, const DerivedX > polygamma(const Eigen::ArrayBase< DerivedN > &n, const Eigen::ArrayBase< DerivedX > &x)
Definition: SpecialFunctionsArrayAPI.h:112
lgamma
const EIGEN_DEVICE_FUNC LgammaReturnType lgamma() const
Definition: ArrayCwiseUnaryOps.h:620
Eigen::numext::q
EIGEN_DEVICE_FUNC const Scalar & q
Definition: SpecialFunctionsImpl.h:1984
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::igamma
const EIGEN_STRONG_INLINE Eigen::CwiseBinaryOp< Eigen::internal::scalar_igamma_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igamma(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition: SpecialFunctionsArrayAPI.h:28
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
zeta
double zeta(double x, double q)
Definition: zeta.c:89
Eigen::zeta
const EIGEN_STRONG_INLINE Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:156
erf
double erf(double x)
Definition: ndtr.c:285
ndtri
double ndtri(double y0)
Definition: ndtri.c:134
erfc
double erfc(double a)
Definition: ndtr.c:227
Eigen::half
Definition: Half.h:142
Eigen::numext::b
EIGEN_DEVICE_FUNC const Scalar & b
Definition: SpecialFunctionsImpl.h:2038
Eigen::igammac
const EIGEN_STRONG_INLINE Eigen::CwiseBinaryOp< Eigen::internal::scalar_igammac_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igammac(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition: SpecialFunctionsArrayAPI.h:90


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:58