From a5e49976f5534aa1acd84eb6a375a1fbb0eac87c Mon Sep 17 00:00:00 2001 From: Deanna Hood Date: Wed, 11 Mar 2015 08:56:42 +1000 Subject: Add log10 array support --- Eigen/src/plugins/ArrayCwiseUnaryOps.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Eigen/src/plugins/ArrayCwiseUnaryOps.h') diff --git a/Eigen/src/plugins/ArrayCwiseUnaryOps.h b/Eigen/src/plugins/ArrayCwiseUnaryOps.h index b5f66e181..eae5de9f6 100644 --- a/Eigen/src/plugins/ArrayCwiseUnaryOps.h +++ b/Eigen/src/plugins/ArrayCwiseUnaryOps.h @@ -8,6 +8,7 @@ typedef CwiseUnaryOp, const Derived> Inverse typedef CwiseUnaryOp, const Derived> ExpReturnType; typedef CwiseUnaryOp, const Derived> LogReturnType; +typedef CwiseUnaryOp, const Derived> Log10ReturnType; typedef CwiseUnaryOp, const Derived> CosReturnType; typedef CwiseUnaryOp, const Derived> SinReturnType; typedef CwiseUnaryOp, const Derived> AcosReturnType; @@ -99,6 +100,22 @@ log() const return LogReturnType(derived()); } +/** \returns an expression of the coefficient-wise base-10 logarithm of *this. + * + * This function computes the coefficient-wise base-10 logarithm. + * + * Example: \include Cwise_log10.cpp + * Output: \verbinclude Cwise_log10.out + * + * \sa log() + */ +EIGEN_DEVICE_FUNC +inline const Log10ReturnType +log10() const +{ + return Log10ReturnType(derived()); +} + /** \returns an expression of the coefficient-wise square root of *this. * * This function computes the coefficient-wise square root. The function MatrixBase::sqrt() in the -- cgit v1.2.3