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
USING_NAMESPACE_ACADO IntermediateState sin(const Expression &arg)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_pow_op< typename Derived::Scalar >, const Derived > pow(const Eigen::ArrayBase< Derived > &x, const typename Derived::Scalar &exponent)
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
IntermediateState sqrt(const Expression &arg)
#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)
iterative scaling algorithm to equilibrate rows and column norms in matrices
DerType::Scalar imag(const AutoDiffScalar< DerType > &)
IntermediateState asin(const Expression &arg)
IntermediateState tan(const Expression &arg)
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs2_op< Scalar >, const Derived > abs2() const
IntermediateState cos(const Expression &arg)
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
Generic expression where a coefficient-wise binary operator is applied to two expressions.
IntermediateState acos(const Expression &arg)
Base class for all 1D and 2D array, and related expressions.
IntermediateState exp(const Expression &arg)
Generic expression where a coefficient-wise unary operator is applied to an expression.
const AutoDiffScalar< DerType > & real(const AutoDiffScalar< DerType > &x)
IntermediateState log(const Expression &arg)