/** \returns an expression of the coefficient-wise absolute value of \c *this * * Example: \include Cwise_abs.cpp * Output: \verbinclude Cwise_abs.out * * \sa abs2() */ EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> abs() const { return derived(); } /** \returns an expression of the coefficient-wise squared absolute value of \c *this * * Example: \include Cwise_abs2.cpp * Output: \verbinclude Cwise_abs2.out * * \sa abs(), square() */ EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> abs2() const { return derived(); } /** \returns an expression of the coefficient-wise exponential of *this. * * Example: \include Cwise_exp.cpp * Output: \verbinclude Cwise_exp.out * * \sa pow(), log(), sin(), cos() */ inline const CwiseUnaryOp, const Derived> exp() const { return derived(); } /** \returns an expression of the coefficient-wise logarithm of *this. * * Example: \include Cwise_log.cpp * Output: \verbinclude Cwise_log.out * * \sa exp() */ inline const CwiseUnaryOp, const Derived> log() const { return derived(); } /** \returns an expression of the coefficient-wise square root of *this. * * Example: \include Cwise_sqrt.cpp * Output: \verbinclude Cwise_sqrt.out * * \sa pow(), square() */ inline const CwiseUnaryOp, const Derived> sqrt() const { return derived(); } /** \returns an expression of the coefficient-wise cosine of *this. * * Example: \include Cwise_cos.cpp * Output: \verbinclude Cwise_cos.out * * \sa sin(), acos() */ inline const CwiseUnaryOp, const Derived> cos() const { return derived(); } /** \returns an expression of the coefficient-wise sine of *this. * * Example: \include Cwise_sin.cpp * Output: \verbinclude Cwise_sin.out * * \sa cos(), asin() */ inline const CwiseUnaryOp, const Derived> sin() const { return derived(); } /** \returns an expression of the coefficient-wise arc cosine of *this. * * Example: \include Cwise_acos.cpp * Output: \verbinclude Cwise_acos.out * * \sa cos(), asin() */ inline const CwiseUnaryOp, const Derived> acos() const { return derived(); } /** \returns an expression of the coefficient-wise arc sine of *this. * * Example: \include Cwise_asin.cpp * Output: \verbinclude Cwise_asin.out * * \sa sin(), acos() */ inline const CwiseUnaryOp, const Derived> asin() const { return derived(); } /** \returns an expression of the coefficient-wise tan of *this. * * Example: \include Cwise_tan.cpp * Output: \verbinclude Cwise_tan.out * * \sa cos(), sin() */ inline const CwiseUnaryOp, Derived> tan() const { return derived(); } /** \returns an expression of the coefficient-wise power of *this to the given exponent. * * Example: \include Cwise_pow.cpp * Output: \verbinclude Cwise_pow.out * * \sa exp(), log() */ inline const CwiseUnaryOp, const Derived> pow(const Scalar& exponent) const { return CwiseUnaryOp, const Derived> (derived(), internal::scalar_pow_op(exponent)); } /** \returns an expression of the coefficient-wise inverse of *this. * * Example: \include Cwise_inverse.cpp * Output: \verbinclude Cwise_inverse.out * * \sa operator/(), operator*() */ inline const CwiseUnaryOp, const Derived> inverse() const { return derived(); } /** \returns an expression of the coefficient-wise square of *this. * * Example: \include Cwise_square.cpp * Output: \verbinclude Cwise_square.out * * \sa operator/(), operator*(), abs2() */ inline const CwiseUnaryOp, const Derived> square() const { return derived(); } /** \returns an expression of the coefficient-wise cube of *this. * * Example: \include Cwise_cube.cpp * Output: \verbinclude Cwise_cube.out * * \sa square(), pow() */ inline const CwiseUnaryOp, const Derived> cube() const { return derived(); } #define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \ inline const CwiseUnaryOp >, const Derived> \ METHOD_NAME(const Scalar& s) const { \ return CwiseUnaryOp >, const Derived> \ (derived(), std::bind2nd(FUNCTOR(), s)); \ } EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator==, std::equal_to) EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator!=, std::not_equal_to) EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator<, std::less) EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator<=, std::less_equal) EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator>, std::greater) EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator>=, std::greater_equal)