|
||||
File indexing completed on 2025-01-18 09:57:08
0001 // This file is part of Eigen, a lightweight C++ template library 0002 // for linear algebra. 0003 // 0004 // Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr> 0005 // 0006 // This Source Code Form is subject to the terms of the Mozilla 0007 // Public License v. 2.0. If a copy of the MPL was not distributed 0008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 0009 0010 0011 #ifndef EIGEN_BESSELFUNCTIONS_ARRAYAPI_H 0012 #define EIGEN_BESSELFUNCTIONS_ARRAYAPI_H 0013 0014 namespace Eigen { 0015 0016 /** \returns an expression of the coefficient-wise i0(\a x) to the given 0017 * arrays. 0018 * 0019 * It returns the modified Bessel function of the first kind of order zero. 0020 * 0021 * \param x is the argument 0022 * 0023 * \note This function supports only float and double scalar types. To support 0024 * other scalar types, the user has to provide implementations of i0(T) for 0025 * any scalar type T to be supported. 0026 * 0027 * \sa ArrayBase::bessel_i0() 0028 */ 0029 template <typename Derived> 0030 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0031 Eigen::internal::scalar_bessel_i0_op<typename Derived::Scalar>, const Derived> 0032 bessel_i0(const Eigen::ArrayBase<Derived>& x) { 0033 return Eigen::CwiseUnaryOp< 0034 Eigen::internal::scalar_bessel_i0_op<typename Derived::Scalar>, 0035 const Derived>(x.derived()); 0036 } 0037 0038 /** \returns an expression of the coefficient-wise i0e(\a x) to the given 0039 * arrays. 0040 * 0041 * It returns the exponentially scaled modified Bessel 0042 * function of the first kind of order zero. 0043 * 0044 * \param x is the argument 0045 * 0046 * \note This function supports only float and double scalar types. To support 0047 * other scalar types, the user has to provide implementations of i0e(T) for 0048 * any scalar type T to be supported. 0049 * 0050 * \sa ArrayBase::bessel_i0e() 0051 */ 0052 template <typename Derived> 0053 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0054 Eigen::internal::scalar_bessel_i0e_op<typename Derived::Scalar>, const Derived> 0055 bessel_i0e(const Eigen::ArrayBase<Derived>& x) { 0056 return Eigen::CwiseUnaryOp< 0057 Eigen::internal::scalar_bessel_i0e_op<typename Derived::Scalar>, 0058 const Derived>(x.derived()); 0059 } 0060 0061 /** \returns an expression of the coefficient-wise i1(\a x) to the given 0062 * arrays. 0063 * 0064 * It returns the modified Bessel function of the first kind of order one. 0065 * 0066 * \param x is the argument 0067 * 0068 * \note This function supports only float and double scalar types. To support 0069 * other scalar types, the user has to provide implementations of i1(T) for 0070 * any scalar type T to be supported. 0071 * 0072 * \sa ArrayBase::bessel_i1() 0073 */ 0074 template <typename Derived> 0075 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0076 Eigen::internal::scalar_bessel_i1_op<typename Derived::Scalar>, const Derived> 0077 bessel_i1(const Eigen::ArrayBase<Derived>& x) { 0078 return Eigen::CwiseUnaryOp< 0079 Eigen::internal::scalar_bessel_i1_op<typename Derived::Scalar>, 0080 const Derived>(x.derived()); 0081 } 0082 0083 /** \returns an expression of the coefficient-wise i1e(\a x) to the given 0084 * arrays. 0085 * 0086 * It returns the exponentially scaled modified Bessel 0087 * function of the first kind of order one. 0088 * 0089 * \param x is the argument 0090 * 0091 * \note This function supports only float and double scalar types. To support 0092 * other scalar types, the user has to provide implementations of i1e(T) for 0093 * any scalar type T to be supported. 0094 * 0095 * \sa ArrayBase::bessel_i1e() 0096 */ 0097 template <typename Derived> 0098 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0099 Eigen::internal::scalar_bessel_i1e_op<typename Derived::Scalar>, const Derived> 0100 bessel_i1e(const Eigen::ArrayBase<Derived>& x) { 0101 return Eigen::CwiseUnaryOp< 0102 Eigen::internal::scalar_bessel_i1e_op<typename Derived::Scalar>, 0103 const Derived>(x.derived()); 0104 } 0105 0106 /** \returns an expression of the coefficient-wise k0(\a x) to the given 0107 * arrays. 0108 * 0109 * It returns the modified Bessel function of the second kind of order zero. 0110 * 0111 * \param x is the argument 0112 * 0113 * \note This function supports only float and double scalar types. To support 0114 * other scalar types, the user has to provide implementations of k0(T) for 0115 * any scalar type T to be supported. 0116 * 0117 * \sa ArrayBase::bessel_k0() 0118 */ 0119 template <typename Derived> 0120 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0121 Eigen::internal::scalar_bessel_k0_op<typename Derived::Scalar>, const Derived> 0122 bessel_k0(const Eigen::ArrayBase<Derived>& x) { 0123 return Eigen::CwiseUnaryOp< 0124 Eigen::internal::scalar_bessel_k0_op<typename Derived::Scalar>, 0125 const Derived>(x.derived()); 0126 } 0127 0128 /** \returns an expression of the coefficient-wise k0e(\a x) to the given 0129 * arrays. 0130 * 0131 * It returns the exponentially scaled modified Bessel 0132 * function of the second kind of order zero. 0133 * 0134 * \param x is the argument 0135 * 0136 * \note This function supports only float and double scalar types. To support 0137 * other scalar types, the user has to provide implementations of k0e(T) for 0138 * any scalar type T to be supported. 0139 * 0140 * \sa ArrayBase::bessel_k0e() 0141 */ 0142 template <typename Derived> 0143 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0144 Eigen::internal::scalar_bessel_k0e_op<typename Derived::Scalar>, const Derived> 0145 bessel_k0e(const Eigen::ArrayBase<Derived>& x) { 0146 return Eigen::CwiseUnaryOp< 0147 Eigen::internal::scalar_bessel_k0e_op<typename Derived::Scalar>, 0148 const Derived>(x.derived()); 0149 } 0150 0151 /** \returns an expression of the coefficient-wise k1(\a x) to the given 0152 * arrays. 0153 * 0154 * It returns the modified Bessel function of the second kind of order one. 0155 * 0156 * \param x is the argument 0157 * 0158 * \note This function supports only float and double scalar types. To support 0159 * other scalar types, the user has to provide implementations of k1(T) for 0160 * any scalar type T to be supported. 0161 * 0162 * \sa ArrayBase::bessel_k1() 0163 */ 0164 template <typename Derived> 0165 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0166 Eigen::internal::scalar_bessel_k1_op<typename Derived::Scalar>, const Derived> 0167 bessel_k1(const Eigen::ArrayBase<Derived>& x) { 0168 return Eigen::CwiseUnaryOp< 0169 Eigen::internal::scalar_bessel_k1_op<typename Derived::Scalar>, 0170 const Derived>(x.derived()); 0171 } 0172 0173 /** \returns an expression of the coefficient-wise k1e(\a x) to the given 0174 * arrays. 0175 * 0176 * It returns the exponentially scaled modified Bessel 0177 * function of the second kind of order one. 0178 * 0179 * \param x is the argument 0180 * 0181 * \note This function supports only float and double scalar types. To support 0182 * other scalar types, the user has to provide implementations of k1e(T) for 0183 * any scalar type T to be supported. 0184 * 0185 * \sa ArrayBase::bessel_k1e() 0186 */ 0187 template <typename Derived> 0188 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0189 Eigen::internal::scalar_bessel_k1e_op<typename Derived::Scalar>, const Derived> 0190 bessel_k1e(const Eigen::ArrayBase<Derived>& x) { 0191 return Eigen::CwiseUnaryOp< 0192 Eigen::internal::scalar_bessel_k1e_op<typename Derived::Scalar>, 0193 const Derived>(x.derived()); 0194 } 0195 0196 /** \returns an expression of the coefficient-wise j0(\a x) to the given 0197 * arrays. 0198 * 0199 * It returns the Bessel function of the first kind of order zero. 0200 * 0201 * \param x is the argument 0202 * 0203 * \note This function supports only float and double scalar types. To support 0204 * other scalar types, the user has to provide implementations of j0(T) for 0205 * any scalar type T to be supported. 0206 * 0207 * \sa ArrayBase::bessel_j0() 0208 */ 0209 template <typename Derived> 0210 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0211 Eigen::internal::scalar_bessel_j0_op<typename Derived::Scalar>, const Derived> 0212 bessel_j0(const Eigen::ArrayBase<Derived>& x) { 0213 return Eigen::CwiseUnaryOp< 0214 Eigen::internal::scalar_bessel_j0_op<typename Derived::Scalar>, 0215 const Derived>(x.derived()); 0216 } 0217 0218 /** \returns an expression of the coefficient-wise y0(\a x) to the given 0219 * arrays. 0220 * 0221 * It returns the Bessel function of the second kind of order zero. 0222 * 0223 * \param x is the argument 0224 * 0225 * \note This function supports only float and double scalar types. To support 0226 * other scalar types, the user has to provide implementations of y0(T) for 0227 * any scalar type T to be supported. 0228 * 0229 * \sa ArrayBase::bessel_y0() 0230 */ 0231 template <typename Derived> 0232 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0233 Eigen::internal::scalar_bessel_y0_op<typename Derived::Scalar>, const Derived> 0234 bessel_y0(const Eigen::ArrayBase<Derived>& x) { 0235 return Eigen::CwiseUnaryOp< 0236 Eigen::internal::scalar_bessel_y0_op<typename Derived::Scalar>, 0237 const Derived>(x.derived()); 0238 } 0239 0240 /** \returns an expression of the coefficient-wise j1(\a x) to the given 0241 * arrays. 0242 * 0243 * It returns the modified Bessel function of the first kind of order one. 0244 * 0245 * \param x is the argument 0246 * 0247 * \note This function supports only float and double scalar types. To support 0248 * other scalar types, the user has to provide implementations of j1(T) for 0249 * any scalar type T to be supported. 0250 * 0251 * \sa ArrayBase::bessel_j1() 0252 */ 0253 template <typename Derived> 0254 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0255 Eigen::internal::scalar_bessel_j1_op<typename Derived::Scalar>, const Derived> 0256 bessel_j1(const Eigen::ArrayBase<Derived>& x) { 0257 return Eigen::CwiseUnaryOp< 0258 Eigen::internal::scalar_bessel_j1_op<typename Derived::Scalar>, 0259 const Derived>(x.derived()); 0260 } 0261 0262 /** \returns an expression of the coefficient-wise y1(\a x) to the given 0263 * arrays. 0264 * 0265 * It returns the Bessel function of the second kind of order one. 0266 * 0267 * \param x is the argument 0268 * 0269 * \note This function supports only float and double scalar types. To support 0270 * other scalar types, the user has to provide implementations of y1(T) for 0271 * any scalar type T to be supported. 0272 * 0273 * \sa ArrayBase::bessel_y1() 0274 */ 0275 template <typename Derived> 0276 EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< 0277 Eigen::internal::scalar_bessel_y1_op<typename Derived::Scalar>, const Derived> 0278 bessel_y1(const Eigen::ArrayBase<Derived>& x) { 0279 return Eigen::CwiseUnaryOp< 0280 Eigen::internal::scalar_bessel_y1_op<typename Derived::Scalar>, 0281 const Derived>(x.derived()); 0282 } 0283 0284 } // end namespace Eigen 0285 0286 #endif // EIGEN_BESSELFUNCTIONS_ARRAYAPI_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |