|
||||
Warning, file /include/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 0002 0003 typedef CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> AbsReturnType; 0004 typedef CwiseUnaryOp<internal::scalar_arg_op<Scalar>, const Derived> ArgReturnType; 0005 typedef CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived> Abs2ReturnType; 0006 typedef CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> SqrtReturnType; 0007 typedef CwiseUnaryOp<internal::scalar_rsqrt_op<Scalar>, const Derived> RsqrtReturnType; 0008 typedef CwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived> SignReturnType; 0009 typedef CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> InverseReturnType; 0010 typedef CwiseUnaryOp<internal::scalar_boolean_not_op<Scalar>, const Derived> BooleanNotReturnType; 0011 0012 typedef CwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived> ExpReturnType; 0013 typedef CwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived> Expm1ReturnType; 0014 typedef CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived> LogReturnType; 0015 typedef CwiseUnaryOp<internal::scalar_log1p_op<Scalar>, const Derived> Log1pReturnType; 0016 typedef CwiseUnaryOp<internal::scalar_log10_op<Scalar>, const Derived> Log10ReturnType; 0017 typedef CwiseUnaryOp<internal::scalar_log2_op<Scalar>, const Derived> Log2ReturnType; 0018 typedef CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived> CosReturnType; 0019 typedef CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived> SinReturnType; 0020 typedef CwiseUnaryOp<internal::scalar_tan_op<Scalar>, const Derived> TanReturnType; 0021 typedef CwiseUnaryOp<internal::scalar_acos_op<Scalar>, const Derived> AcosReturnType; 0022 typedef CwiseUnaryOp<internal::scalar_asin_op<Scalar>, const Derived> AsinReturnType; 0023 typedef CwiseUnaryOp<internal::scalar_atan_op<Scalar>, const Derived> AtanReturnType; 0024 typedef CwiseUnaryOp<internal::scalar_tanh_op<Scalar>, const Derived> TanhReturnType; 0025 typedef CwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived> LogisticReturnType; 0026 typedef CwiseUnaryOp<internal::scalar_sinh_op<Scalar>, const Derived> SinhReturnType; 0027 #if EIGEN_HAS_CXX11_MATH 0028 typedef CwiseUnaryOp<internal::scalar_atanh_op<Scalar>, const Derived> AtanhReturnType; 0029 typedef CwiseUnaryOp<internal::scalar_asinh_op<Scalar>, const Derived> AsinhReturnType; 0030 typedef CwiseUnaryOp<internal::scalar_acosh_op<Scalar>, const Derived> AcoshReturnType; 0031 #endif 0032 typedef CwiseUnaryOp<internal::scalar_cosh_op<Scalar>, const Derived> CoshReturnType; 0033 typedef CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived> SquareReturnType; 0034 typedef CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived> CubeReturnType; 0035 typedef CwiseUnaryOp<internal::scalar_round_op<Scalar>, const Derived> RoundReturnType; 0036 typedef CwiseUnaryOp<internal::scalar_rint_op<Scalar>, const Derived> RintReturnType; 0037 typedef CwiseUnaryOp<internal::scalar_floor_op<Scalar>, const Derived> FloorReturnType; 0038 typedef CwiseUnaryOp<internal::scalar_ceil_op<Scalar>, const Derived> CeilReturnType; 0039 typedef CwiseUnaryOp<internal::scalar_isnan_op<Scalar>, const Derived> IsNaNReturnType; 0040 typedef CwiseUnaryOp<internal::scalar_isinf_op<Scalar>, const Derived> IsInfReturnType; 0041 typedef CwiseUnaryOp<internal::scalar_isfinite_op<Scalar>, const Derived> IsFiniteReturnType; 0042 0043 /** \returns an expression of the coefficient-wise absolute value of \c *this 0044 * 0045 * Example: \include Cwise_abs.cpp 0046 * Output: \verbinclude Cwise_abs.out 0047 * 0048 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_abs">Math functions</a>, abs2() 0049 */ 0050 EIGEN_DEVICE_FUNC 0051 EIGEN_STRONG_INLINE const AbsReturnType 0052 abs() const 0053 { 0054 return AbsReturnType(derived()); 0055 } 0056 0057 /** \returns an expression of the coefficient-wise phase angle of \c *this 0058 * 0059 * Example: \include Cwise_arg.cpp 0060 * Output: \verbinclude Cwise_arg.out 0061 * 0062 * \sa abs() 0063 */ 0064 EIGEN_DEVICE_FUNC 0065 EIGEN_STRONG_INLINE const ArgReturnType 0066 arg() const 0067 { 0068 return ArgReturnType(derived()); 0069 } 0070 0071 /** \returns an expression of the coefficient-wise squared absolute value of \c *this 0072 * 0073 * Example: \include Cwise_abs2.cpp 0074 * Output: \verbinclude Cwise_abs2.out 0075 * 0076 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_abs2">Math functions</a>, abs(), square() 0077 */ 0078 EIGEN_DEVICE_FUNC 0079 EIGEN_STRONG_INLINE const Abs2ReturnType 0080 abs2() const 0081 { 0082 return Abs2ReturnType(derived()); 0083 } 0084 0085 /** \returns an expression of the coefficient-wise exponential of *this. 0086 * 0087 * This function computes the coefficient-wise exponential. The function MatrixBase::exp() in the 0088 * unsupported module MatrixFunctions computes the matrix exponential. 0089 * 0090 * Example: \include Cwise_exp.cpp 0091 * Output: \verbinclude Cwise_exp.out 0092 * 0093 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_exp">Math functions</a>, pow(), log(), sin(), cos() 0094 */ 0095 EIGEN_DEVICE_FUNC 0096 inline const ExpReturnType 0097 exp() const 0098 { 0099 return ExpReturnType(derived()); 0100 } 0101 0102 /** \returns an expression of the coefficient-wise exponential of *this minus 1. 0103 * 0104 * In exact arithmetic, \c x.expm1() is equivalent to \c x.exp() - 1, 0105 * however, with finite precision, this function is much more accurate when \c x is close to zero. 0106 * 0107 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_expm1">Math functions</a>, exp() 0108 */ 0109 EIGEN_DEVICE_FUNC 0110 inline const Expm1ReturnType 0111 expm1() const 0112 { 0113 return Expm1ReturnType(derived()); 0114 } 0115 0116 /** \returns an expression of the coefficient-wise logarithm of *this. 0117 * 0118 * This function computes the coefficient-wise logarithm. The function MatrixBase::log() in the 0119 * unsupported module MatrixFunctions computes the matrix logarithm. 0120 * 0121 * Example: \include Cwise_log.cpp 0122 * Output: \verbinclude Cwise_log.out 0123 * 0124 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_log">Math functions</a>, log() 0125 */ 0126 EIGEN_DEVICE_FUNC 0127 inline const LogReturnType 0128 log() const 0129 { 0130 return LogReturnType(derived()); 0131 } 0132 0133 /** \returns an expression of the coefficient-wise logarithm of 1 plus \c *this. 0134 * 0135 * In exact arithmetic, \c x.log() is equivalent to \c (x+1).log(), 0136 * however, with finite precision, this function is much more accurate when \c x is close to zero. 0137 * 0138 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_log1p">Math functions</a>, log() 0139 */ 0140 EIGEN_DEVICE_FUNC 0141 inline const Log1pReturnType 0142 log1p() const 0143 { 0144 return Log1pReturnType(derived()); 0145 } 0146 0147 /** \returns an expression of the coefficient-wise base-10 logarithm of *this. 0148 * 0149 * This function computes the coefficient-wise base-10 logarithm. 0150 * 0151 * Example: \include Cwise_log10.cpp 0152 * Output: \verbinclude Cwise_log10.out 0153 * 0154 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_log10">Math functions</a>, log() 0155 */ 0156 EIGEN_DEVICE_FUNC 0157 inline const Log10ReturnType 0158 log10() const 0159 { 0160 return Log10ReturnType(derived()); 0161 } 0162 0163 /** \returns an expression of the coefficient-wise base-2 logarithm of *this. 0164 * 0165 * This function computes the coefficient-wise base-2 logarithm. 0166 * 0167 */ 0168 EIGEN_DEVICE_FUNC 0169 inline const Log2ReturnType 0170 log2() const 0171 { 0172 return Log2ReturnType(derived()); 0173 } 0174 0175 /** \returns an expression of the coefficient-wise square root of *this. 0176 * 0177 * This function computes the coefficient-wise square root. The function MatrixBase::sqrt() in the 0178 * unsupported module MatrixFunctions computes the matrix square root. 0179 * 0180 * Example: \include Cwise_sqrt.cpp 0181 * Output: \verbinclude Cwise_sqrt.out 0182 * 0183 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_sqrt">Math functions</a>, pow(), square() 0184 */ 0185 EIGEN_DEVICE_FUNC 0186 inline const SqrtReturnType 0187 sqrt() const 0188 { 0189 return SqrtReturnType(derived()); 0190 } 0191 0192 /** \returns an expression of the coefficient-wise inverse square root of *this. 0193 * 0194 * This function computes the coefficient-wise inverse square root. 0195 * 0196 * Example: \include Cwise_sqrt.cpp 0197 * Output: \verbinclude Cwise_sqrt.out 0198 * 0199 * \sa pow(), square() 0200 */ 0201 EIGEN_DEVICE_FUNC 0202 inline const RsqrtReturnType 0203 rsqrt() const 0204 { 0205 return RsqrtReturnType(derived()); 0206 } 0207 0208 /** \returns an expression of the coefficient-wise signum of *this. 0209 * 0210 * This function computes the coefficient-wise signum. 0211 * 0212 * Example: \include Cwise_sign.cpp 0213 * Output: \verbinclude Cwise_sign.out 0214 * 0215 * \sa pow(), square() 0216 */ 0217 EIGEN_DEVICE_FUNC 0218 inline const SignReturnType 0219 sign() const 0220 { 0221 return SignReturnType(derived()); 0222 } 0223 0224 0225 /** \returns an expression of the coefficient-wise cosine of *this. 0226 * 0227 * This function computes the coefficient-wise cosine. The function MatrixBase::cos() in the 0228 * unsupported module MatrixFunctions computes the matrix cosine. 0229 * 0230 * Example: \include Cwise_cos.cpp 0231 * Output: \verbinclude Cwise_cos.out 0232 * 0233 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_cos">Math functions</a>, sin(), acos() 0234 */ 0235 EIGEN_DEVICE_FUNC 0236 inline const CosReturnType 0237 cos() const 0238 { 0239 return CosReturnType(derived()); 0240 } 0241 0242 0243 /** \returns an expression of the coefficient-wise sine of *this. 0244 * 0245 * This function computes the coefficient-wise sine. The function MatrixBase::sin() in the 0246 * unsupported module MatrixFunctions computes the matrix sine. 0247 * 0248 * Example: \include Cwise_sin.cpp 0249 * Output: \verbinclude Cwise_sin.out 0250 * 0251 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_sin">Math functions</a>, cos(), asin() 0252 */ 0253 EIGEN_DEVICE_FUNC 0254 inline const SinReturnType 0255 sin() const 0256 { 0257 return SinReturnType(derived()); 0258 } 0259 0260 /** \returns an expression of the coefficient-wise tan of *this. 0261 * 0262 * Example: \include Cwise_tan.cpp 0263 * Output: \verbinclude Cwise_tan.out 0264 * 0265 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_tan">Math functions</a>, cos(), sin() 0266 */ 0267 EIGEN_DEVICE_FUNC 0268 inline const TanReturnType 0269 tan() const 0270 { 0271 return TanReturnType(derived()); 0272 } 0273 0274 /** \returns an expression of the coefficient-wise arc tan of *this. 0275 * 0276 * Example: \include Cwise_atan.cpp 0277 * Output: \verbinclude Cwise_atan.out 0278 * 0279 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_atan">Math functions</a>, tan(), asin(), acos() 0280 */ 0281 EIGEN_DEVICE_FUNC 0282 inline const AtanReturnType 0283 atan() const 0284 { 0285 return AtanReturnType(derived()); 0286 } 0287 0288 /** \returns an expression of the coefficient-wise arc cosine of *this. 0289 * 0290 * Example: \include Cwise_acos.cpp 0291 * Output: \verbinclude Cwise_acos.out 0292 * 0293 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_acos">Math functions</a>, cos(), asin() 0294 */ 0295 EIGEN_DEVICE_FUNC 0296 inline const AcosReturnType 0297 acos() const 0298 { 0299 return AcosReturnType(derived()); 0300 } 0301 0302 /** \returns an expression of the coefficient-wise arc sine of *this. 0303 * 0304 * Example: \include Cwise_asin.cpp 0305 * Output: \verbinclude Cwise_asin.out 0306 * 0307 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_asin">Math functions</a>, sin(), acos() 0308 */ 0309 EIGEN_DEVICE_FUNC 0310 inline const AsinReturnType 0311 asin() const 0312 { 0313 return AsinReturnType(derived()); 0314 } 0315 0316 /** \returns an expression of the coefficient-wise hyperbolic tan of *this. 0317 * 0318 * Example: \include Cwise_tanh.cpp 0319 * Output: \verbinclude Cwise_tanh.out 0320 * 0321 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_tanh">Math functions</a>, tan(), sinh(), cosh() 0322 */ 0323 EIGEN_DEVICE_FUNC 0324 inline const TanhReturnType 0325 tanh() const 0326 { 0327 return TanhReturnType(derived()); 0328 } 0329 0330 /** \returns an expression of the coefficient-wise hyperbolic sin of *this. 0331 * 0332 * Example: \include Cwise_sinh.cpp 0333 * Output: \verbinclude Cwise_sinh.out 0334 * 0335 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_sinh">Math functions</a>, sin(), tanh(), cosh() 0336 */ 0337 EIGEN_DEVICE_FUNC 0338 inline const SinhReturnType 0339 sinh() const 0340 { 0341 return SinhReturnType(derived()); 0342 } 0343 0344 /** \returns an expression of the coefficient-wise hyperbolic cos of *this. 0345 * 0346 * Example: \include Cwise_cosh.cpp 0347 * Output: \verbinclude Cwise_cosh.out 0348 * 0349 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_cosh">Math functions</a>, tanh(), sinh(), cosh() 0350 */ 0351 EIGEN_DEVICE_FUNC 0352 inline const CoshReturnType 0353 cosh() const 0354 { 0355 return CoshReturnType(derived()); 0356 } 0357 0358 #if EIGEN_HAS_CXX11_MATH 0359 /** \returns an expression of the coefficient-wise inverse hyperbolic tan of *this. 0360 * 0361 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_atanh">Math functions</a>, atanh(), asinh(), acosh() 0362 */ 0363 EIGEN_DEVICE_FUNC 0364 inline const AtanhReturnType 0365 atanh() const 0366 { 0367 return AtanhReturnType(derived()); 0368 } 0369 0370 /** \returns an expression of the coefficient-wise inverse hyperbolic sin of *this. 0371 * 0372 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_asinh">Math functions</a>, atanh(), asinh(), acosh() 0373 */ 0374 EIGEN_DEVICE_FUNC 0375 inline const AsinhReturnType 0376 asinh() const 0377 { 0378 return AsinhReturnType(derived()); 0379 } 0380 0381 /** \returns an expression of the coefficient-wise inverse hyperbolic cos of *this. 0382 * 0383 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_acosh">Math functions</a>, atanh(), asinh(), acosh() 0384 */ 0385 EIGEN_DEVICE_FUNC 0386 inline const AcoshReturnType 0387 acosh() const 0388 { 0389 return AcoshReturnType(derived()); 0390 } 0391 #endif 0392 0393 /** \returns an expression of the coefficient-wise logistic of *this. 0394 */ 0395 EIGEN_DEVICE_FUNC 0396 inline const LogisticReturnType 0397 logistic() const 0398 { 0399 return LogisticReturnType(derived()); 0400 } 0401 0402 /** \returns an expression of the coefficient-wise inverse of *this. 0403 * 0404 * Example: \include Cwise_inverse.cpp 0405 * Output: \verbinclude Cwise_inverse.out 0406 * 0407 * \sa operator/(), operator*() 0408 */ 0409 EIGEN_DEVICE_FUNC 0410 inline const InverseReturnType 0411 inverse() const 0412 { 0413 return InverseReturnType(derived()); 0414 } 0415 0416 /** \returns an expression of the coefficient-wise square of *this. 0417 * 0418 * Example: \include Cwise_square.cpp 0419 * Output: \verbinclude Cwise_square.out 0420 * 0421 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_squareE">Math functions</a>, abs2(), cube(), pow() 0422 */ 0423 EIGEN_DEVICE_FUNC 0424 inline const SquareReturnType 0425 square() const 0426 { 0427 return SquareReturnType(derived()); 0428 } 0429 0430 /** \returns an expression of the coefficient-wise cube of *this. 0431 * 0432 * Example: \include Cwise_cube.cpp 0433 * Output: \verbinclude Cwise_cube.out 0434 * 0435 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_cube">Math functions</a>, square(), pow() 0436 */ 0437 EIGEN_DEVICE_FUNC 0438 inline const CubeReturnType 0439 cube() const 0440 { 0441 return CubeReturnType(derived()); 0442 } 0443 0444 /** \returns an expression of the coefficient-wise rint of *this. 0445 * 0446 * Example: \include Cwise_rint.cpp 0447 * Output: \verbinclude Cwise_rint.out 0448 * 0449 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_rint">Math functions</a>, ceil(), floor() 0450 */ 0451 EIGEN_DEVICE_FUNC 0452 inline const RintReturnType 0453 rint() const 0454 { 0455 return RintReturnType(derived()); 0456 } 0457 0458 /** \returns an expression of the coefficient-wise round of *this. 0459 * 0460 * Example: \include Cwise_round.cpp 0461 * Output: \verbinclude Cwise_round.out 0462 * 0463 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_round">Math functions</a>, ceil(), floor() 0464 */ 0465 EIGEN_DEVICE_FUNC 0466 inline const RoundReturnType 0467 round() const 0468 { 0469 return RoundReturnType(derived()); 0470 } 0471 0472 /** \returns an expression of the coefficient-wise floor of *this. 0473 * 0474 * Example: \include Cwise_floor.cpp 0475 * Output: \verbinclude Cwise_floor.out 0476 * 0477 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_floor">Math functions</a>, ceil(), round() 0478 */ 0479 EIGEN_DEVICE_FUNC 0480 inline const FloorReturnType 0481 floor() const 0482 { 0483 return FloorReturnType(derived()); 0484 } 0485 0486 /** \returns an expression of the coefficient-wise ceil of *this. 0487 * 0488 * Example: \include Cwise_ceil.cpp 0489 * Output: \verbinclude Cwise_ceil.out 0490 * 0491 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_ceil">Math functions</a>, floor(), round() 0492 */ 0493 EIGEN_DEVICE_FUNC 0494 inline const CeilReturnType 0495 ceil() const 0496 { 0497 return CeilReturnType(derived()); 0498 } 0499 0500 template<int N> struct ShiftRightXpr { 0501 typedef CwiseUnaryOp<internal::scalar_shift_right_op<Scalar, N>, const Derived> Type; 0502 }; 0503 0504 /** \returns an expression of \c *this with the \a Scalar type arithmetically 0505 * shifted right by \a N bit positions. 0506 * 0507 * The template parameter \a N specifies the number of bit positions to shift. 0508 * 0509 * \sa shiftLeft() 0510 */ 0511 template<int N> 0512 EIGEN_DEVICE_FUNC 0513 typename ShiftRightXpr<N>::Type 0514 shiftRight() const 0515 { 0516 return typename ShiftRightXpr<N>::Type(derived()); 0517 } 0518 0519 0520 template<int N> struct ShiftLeftXpr { 0521 typedef CwiseUnaryOp<internal::scalar_shift_left_op<Scalar, N>, const Derived> Type; 0522 }; 0523 0524 /** \returns an expression of \c *this with the \a Scalar type logically 0525 * shifted left by \a N bit positions. 0526 * 0527 * The template parameter \a N specifies the number of bit positions to shift. 0528 * 0529 * \sa shiftRight() 0530 */ 0531 template<int N> 0532 EIGEN_DEVICE_FUNC 0533 typename ShiftLeftXpr<N>::Type 0534 shiftLeft() const 0535 { 0536 return typename ShiftLeftXpr<N>::Type(derived()); 0537 } 0538 0539 /** \returns an expression of the coefficient-wise isnan of *this. 0540 * 0541 * Example: \include Cwise_isNaN.cpp 0542 * Output: \verbinclude Cwise_isNaN.out 0543 * 0544 * \sa isfinite(), isinf() 0545 */ 0546 EIGEN_DEVICE_FUNC 0547 inline const IsNaNReturnType 0548 isNaN() const 0549 { 0550 return IsNaNReturnType(derived()); 0551 } 0552 0553 /** \returns an expression of the coefficient-wise isinf of *this. 0554 * 0555 * Example: \include Cwise_isInf.cpp 0556 * Output: \verbinclude Cwise_isInf.out 0557 * 0558 * \sa isnan(), isfinite() 0559 */ 0560 EIGEN_DEVICE_FUNC 0561 inline const IsInfReturnType 0562 isInf() const 0563 { 0564 return IsInfReturnType(derived()); 0565 } 0566 0567 /** \returns an expression of the coefficient-wise isfinite of *this. 0568 * 0569 * Example: \include Cwise_isFinite.cpp 0570 * Output: \verbinclude Cwise_isFinite.out 0571 * 0572 * \sa isnan(), isinf() 0573 */ 0574 EIGEN_DEVICE_FUNC 0575 inline const IsFiniteReturnType 0576 isFinite() const 0577 { 0578 return IsFiniteReturnType(derived()); 0579 } 0580 0581 /** \returns an expression of the coefficient-wise ! operator of *this 0582 * 0583 * \warning this operator is for expression of bool only. 0584 * 0585 * Example: \include Cwise_boolean_not.cpp 0586 * Output: \verbinclude Cwise_boolean_not.out 0587 * 0588 * \sa operator!=() 0589 */ 0590 EIGEN_DEVICE_FUNC 0591 inline const BooleanNotReturnType 0592 operator!() const 0593 { 0594 EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value), 0595 THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL); 0596 return BooleanNotReturnType(derived()); 0597 } 0598 0599 0600 // --- SpecialFunctions module --- 0601 0602 typedef CwiseUnaryOp<internal::scalar_lgamma_op<Scalar>, const Derived> LgammaReturnType; 0603 typedef CwiseUnaryOp<internal::scalar_digamma_op<Scalar>, const Derived> DigammaReturnType; 0604 typedef CwiseUnaryOp<internal::scalar_erf_op<Scalar>, const Derived> ErfReturnType; 0605 typedef CwiseUnaryOp<internal::scalar_erfc_op<Scalar>, const Derived> ErfcReturnType; 0606 typedef CwiseUnaryOp<internal::scalar_ndtri_op<Scalar>, const Derived> NdtriReturnType; 0607 0608 /** \cpp11 \returns an expression of the coefficient-wise ln(|gamma(*this)|). 0609 * 0610 * \specialfunctions_module 0611 * 0612 * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, 0613 * or float/double in non c++11 mode, the user has to provide implementations of lgamma(T) for any scalar 0614 * type T to be supported. 0615 * 0616 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_lgamma">Math functions</a>, digamma() 0617 */ 0618 EIGEN_DEVICE_FUNC 0619 inline const LgammaReturnType 0620 lgamma() const 0621 { 0622 return LgammaReturnType(derived()); 0623 } 0624 0625 /** \returns an expression of the coefficient-wise digamma (psi, derivative of lgamma). 0626 * 0627 * \specialfunctions_module 0628 * 0629 * \note This function supports only float and double scalar types. To support other scalar types, 0630 * the user has to provide implementations of digamma(T) for any scalar 0631 * type T to be supported. 0632 * 0633 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_digamma">Math functions</a>, Eigen::digamma(), Eigen::polygamma(), lgamma() 0634 */ 0635 EIGEN_DEVICE_FUNC 0636 inline const DigammaReturnType 0637 digamma() const 0638 { 0639 return DigammaReturnType(derived()); 0640 } 0641 0642 /** \cpp11 \returns an expression of the coefficient-wise Gauss error 0643 * function of *this. 0644 * 0645 * \specialfunctions_module 0646 * 0647 * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, 0648 * or float/double in non c++11 mode, the user has to provide implementations of erf(T) for any scalar 0649 * type T to be supported. 0650 * 0651 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_erf">Math functions</a>, erfc() 0652 */ 0653 EIGEN_DEVICE_FUNC 0654 inline const ErfReturnType 0655 erf() const 0656 { 0657 return ErfReturnType(derived()); 0658 } 0659 0660 /** \cpp11 \returns an expression of the coefficient-wise Complementary error 0661 * function of *this. 0662 * 0663 * \specialfunctions_module 0664 * 0665 * \note This function supports only float and double scalar types in c++11 mode. To support other scalar types, 0666 * or float/double in non c++11 mode, the user has to provide implementations of erfc(T) for any scalar 0667 * type T to be supported. 0668 * 0669 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_erfc">Math functions</a>, erf() 0670 */ 0671 EIGEN_DEVICE_FUNC 0672 inline const ErfcReturnType 0673 erfc() const 0674 { 0675 return ErfcReturnType(derived()); 0676 } 0677 0678 /** \returns an expression of the coefficient-wise inverse of the CDF of the Normal distribution function 0679 * function of *this. 0680 * 0681 * \specialfunctions_module 0682 * 0683 * In other words, considering `x = ndtri(y)`, it returns the argument, x, for which the area under the 0684 * Gaussian probability density function (integrated from minus infinity to x) is equal to y. 0685 * 0686 * \note This function supports only float and double scalar types. To support other scalar types, 0687 * the user has to provide implementations of ndtri(T) for any scalar type T to be supported. 0688 * 0689 * \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_ndtri">Math functions</a> 0690 */ 0691 EIGEN_DEVICE_FUNC 0692 inline const NdtriReturnType 0693 ndtri() const 0694 { 0695 return NdtriReturnType(derived()); 0696 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |