11 #ifndef EIGEN_GLOBAL_FUNCTIONS_H 12 #define EIGEN_GLOBAL_FUNCTIONS_H 14 #define EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(NAME,FUNCTOR) \ 15 template<typename Derived> \ 16 inline const Eigen::CwiseUnaryOp<Eigen::internal::FUNCTOR<typename Derived::Scalar>, const Derived> \ 17 NAME(const Eigen::ArrayBase<Derived>& x) { \ 21 #define EIGEN_ARRAY_DECLARE_GLOBAL_EIGEN_UNARY(NAME,FUNCTOR) \ 23 template<typename Derived> \ 24 struct NAME##_retval<ArrayBase<Derived> > \ 26 typedef const Eigen::CwiseUnaryOp<Eigen::internal::FUNCTOR<typename Derived::Scalar>, const Derived> type; \ 28 template<typename Derived> \ 29 struct NAME##_impl<ArrayBase<Derived> > \ 31 static inline typename NAME##_retval<ArrayBase<Derived> >::type run(const Eigen::ArrayBase<Derived>& x) \ 53 template<
typename Derived>
56 return x.derived().
pow(exponent);
59 template<
typename Derived>
72 template <
typename Derived>
76 return Eigen::CwiseUnaryOp<Eigen::internal::scalar_inverse_mult_op<typename Derived::Scalar>,
const Derived>(
92 #endif // EIGEN_GLOBAL_FUNCTIONS_H const CwiseUnaryOp< internal::scalar_pow_op< Scalar >, const Derived > pow(const Scalar &exponent) const
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_pow_op< typename Derived::Scalar >, const Derived > pow(const Eigen::ArrayBase< Derived > &x, const typename Derived::Scalar &exponent)
#define EIGEN_ARRAY_DECLARE_GLOBAL_EIGEN_UNARY(NAME, FUNCTOR)
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)
Component-wise division of a scalar by array elements.
#define EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(NAME, FUNCTOR)
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs2_op< Scalar >, const Derived > abs2() const
const ImagReturnType imag() const
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
RealReturnType real() const
Generic expression where a coefficient-wise binary operator is applied to two expressions.
const CwiseUnaryOp< internal::scalar_tan_op< Scalar >, Derived > tan() const
const CwiseUnaryOp< internal::scalar_log_op< Scalar >, const Derived > log() const
Base class for all 1D and 2D array, and related expressions.
const CwiseUnaryOp< internal::scalar_sin_op< Scalar >, const Derived > sin() const
const CwiseUnaryOp< internal::scalar_cos_op< Scalar >, const Derived > cos() const
const CwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const Derived > sqrt() const
const CwiseUnaryOp< internal::scalar_exp_op< Scalar >, const Derived > exp() const
const CwiseUnaryOp< internal::scalar_asin_op< Scalar >, const Derived > asin() const
Generic expression where a coefficient-wise unary operator is applied to an expression.
const CwiseUnaryOp< internal::scalar_acos_op< Scalar >, const Derived > acos() const