diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-08-24 09:46:17 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-08-24 09:46:17 -0400 |
commit | b8106e97b40b3a4f4653642e9f244bdae058437b (patch) | |
tree | cb266d79d5687687f0f374c77cb875fb249ba958 /Eigen/src/Core/CwiseUnaryOp.h | |
parent | f31b5a71148387310a55a96158a494e83a19a0e2 (diff) |
add logAbsDeterminant()
move log and exp functors from Array to Core
update documentation
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryOp.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 3ffb24833..d701c25d9 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -205,6 +205,35 @@ MatrixBase<Derived>::cast() 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() + */ +template<typename ExpressionType> +inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_exp_op) +Cwise<ExpressionType>::exp() const +{ + return _expression(); +} + +/** \returns an expression of the coefficient-wise logarithm of *this. + * + * Example: \include Cwise_log.cpp + * Output: \verbinclude Cwise_log.out + * + * \sa exp() + */ +template<typename ExpressionType> +inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_log_op) +Cwise<ExpressionType>::log() const +{ + return _expression(); +} + + /** \relates MatrixBase */ template<typename Derived> EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::ScalarMultipleReturnType |