diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-05-20 14:18:48 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-05-20 14:18:48 +0200 |
commit | c028d9608914f3ef56cea19cba9797a02f8e4dd8 (patch) | |
tree | 80bf7daa545c6e13b35556c5713d4bc2adf5c71a | |
parent | 0ba32f99bdccc2a2c3c8169fd5ccd2091a0d88d4 (diff) |
Improve doc of special math functions
-rw-r--r-- | Eigen/src/Core/GlobalFunctions.h | 26 | ||||
-rw-r--r-- | Eigen/src/Core/SpecialFunctions.h | 6 | ||||
-rw-r--r-- | Eigen/src/plugins/ArrayCwiseBinaryOps.h | 7 | ||||
-rw-r--r-- | Eigen/src/plugins/ArrayCwiseUnaryOps.h | 24 |
4 files changed, 51 insertions, 12 deletions
diff --git a/Eigen/src/Core/GlobalFunctions.h b/Eigen/src/Core/GlobalFunctions.h index 2173e026d..c7d73ff66 100644 --- a/Eigen/src/Core/GlobalFunctions.h +++ b/Eigen/src/Core/GlobalFunctions.h @@ -117,8 +117,8 @@ namespace Eigen } /** - * \brief Component-wise division of a scalar by array elements. - **/ + * \brief Component-wise division of a scalar by array elements. + **/ template <typename Derived> inline const Eigen::CwiseUnaryOp<Eigen::internal::scalar_inverse_mult_op<typename Derived::Scalar>, const Derived> operator/(const typename Derived::Scalar& s, const Eigen::ArrayBase<Derived>& a) @@ -129,10 +129,15 @@ namespace Eigen ); } - /** \returns an expression of the coefficient-wise igamma(\a a, \a x) to the given arrays. + /** \cpp11 \returns an expression of the coefficient-wise igamma(\a a, \a x) to the given arrays. * * This function computes the coefficient-wise incomplete gamma function. * + * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, + * or float/double in non c++11 mode, the user has to provide implementations of igammac(T,T) for any scalar + * type T to be supported. + * + * \sa Eigen::igammac(), Eigen::lgamma() */ template<typename Derived,typename ExponentDerived> inline const Eigen::CwiseBinaryOp<Eigen::internal::scalar_igamma_op<typename Derived::Scalar>, const Derived, const ExponentDerived> @@ -144,10 +149,15 @@ namespace Eigen ); } - /** \returns an expression of the coefficient-wise igammac(\a a, \a x) to the given arrays. + /** \cpp11 \returns an expression of the coefficient-wise igammac(\a a, \a x) to the given arrays. * * This function computes the coefficient-wise complementary incomplete gamma function. * + * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, + * or float/double in non c++11 mode, the user has to provide implementations of igammac(T,T) for any scalar + * type T to be supported. + * + * \sa Eigen::igamma(), Eigen::lgamma() */ template<typename Derived,typename ExponentDerived> inline const Eigen::CwiseBinaryOp<Eigen::internal::scalar_igammac_op<typename Derived::Scalar>, const Derived, const ExponentDerived> @@ -163,6 +173,11 @@ namespace Eigen * * It returns the \a n -th derivative of the digamma(psi) evaluated at \c x. * + * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, + * or float/double in non c++11 mode, the user has to provide implementations of polygamma(T,T) for any scalar + * type T to be supported. + * + * \sa Eigen::digamma() */ // * \warning Be careful with the order of the parameters: x.polygamma(n) is equivalent to polygamma(n,x) // * \sa ArrayBase::polygamma() @@ -183,6 +198,9 @@ namespace Eigen * \param x is the exposent, it must be > 1 * \param q is the shift, it must be > 0 * + * \note This function supports only float and double scalar types. To support other scalar types, the user has + * to provide implementations of zeta(T,T) for any scalar type T to be supported. + * * \sa ArrayBase::zeta() */ template<typename DerivedX,typename DerivedQ> diff --git a/Eigen/src/Core/SpecialFunctions.h b/Eigen/src/Core/SpecialFunctions.h index 38debb4d1..4cf58c510 100644 --- a/Eigen/src/Core/SpecialFunctions.h +++ b/Eigen/src/Core/SpecialFunctions.h @@ -755,9 +755,9 @@ struct igamma_impl { #endif // EIGEN_HAS_C99_MATH -/**************************************************************************** - * Implementation of Riemann zeta function of two arguments * - ****************************************************************************/ +/***************************************************************************** + * Implementation of Riemann zeta function of two arguments, based on Cephes * + *****************************************************************************/ template <typename Scalar> struct zeta_retval { diff --git a/Eigen/src/plugins/ArrayCwiseBinaryOps.h b/Eigen/src/plugins/ArrayCwiseBinaryOps.h index 99f4048d7..c3f8c2575 100644 --- a/Eigen/src/plugins/ArrayCwiseBinaryOps.h +++ b/Eigen/src/plugins/ArrayCwiseBinaryOps.h @@ -317,13 +317,18 @@ polygamma(const EIGEN_CURRENT_STORAGE_BASE_CLASS<DerivedN> &n) const } #endif -/** \cpp11 \returns an expression of the coefficient-wise zeta function. +/** \returns an expression of the coefficient-wise zeta function. * * It returns the Riemann zeta function of two arguments \c *this and \a q: * * \param *this is the exposent, it must be > 1 * \param q is the shift, it must be > 0 * + * \note This function supports only float and double scalar types. To support other scalar types, the user has + * to provide implementations of zeta(T,T) for any scalar type T to be supported. + * + * This method is an alias for zeta(*this,q); + * * \sa Eigen::zeta() */ template<typename DerivedQ> diff --git a/Eigen/src/plugins/ArrayCwiseUnaryOps.h b/Eigen/src/plugins/ArrayCwiseUnaryOps.h index 8b6f1d475..502e3aa1c 100644 --- a/Eigen/src/plugins/ArrayCwiseUnaryOps.h +++ b/Eigen/src/plugins/ArrayCwiseUnaryOps.h @@ -311,7 +311,11 @@ cosh() const * Example: \include Cwise_lgamma.cpp * Output: \verbinclude Cwise_lgamma.out * - * \sa cos(), sin(), tan() + * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, + * or float/double in non c++11 mode, the user has to provide implementations of lgamma(T) for any scalar + * type T to be supported. + * + * \sa digamma() */ inline const LgammaReturnType lgamma() const @@ -321,7 +325,11 @@ lgamma() const /** \returns an expression of the coefficient-wise digamma (psi, derivative of lgamma). * - * \sa cos(), sin(), tan() + * \note This function supports only float and double scalar types. To support other scalar types, + * the user has to provide implementations of digamma(T) for any scalar + * type T to be supported. + * + * \sa Eigen::digamma(), Eigen::polygamma(), lgamma() */ inline const DigammaReturnType digamma() const @@ -335,7 +343,11 @@ digamma() const * Example: \include Cwise_erf.cpp * Output: \verbinclude Cwise_erf.out * - * \sa cos(), sin(), tan() + * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, + * or float/double in non c++11 mode, the user has to provide implementations of erf(T) for any scalar + * type T to be supported. + * + * \sa erfc() */ inline const ErfReturnType erf() const @@ -349,7 +361,11 @@ erf() const * Example: \include Cwise_erfc.cpp * Output: \verbinclude Cwise_erfc.out * - * \sa cos(), sin(), tan() + * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, + * or float/double in non c++11 mode, the user has to provide implementations of erfc(T) for any scalar + * type T to be supported. + * + * \sa erf() */ inline const ErfcReturnType erfc() const |