aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/plugins/ArrayCwiseUnaryOps.h
diff options
context:
space:
mode:
authorGravatar Deanna Hood <deanna.m.hood@gmail.com>2015-03-11 08:56:42 +1000
committerGravatar Deanna Hood <deanna.m.hood@gmail.com>2015-03-11 08:56:42 +1000
commita5e49976f5534aa1acd84eb6a375a1fbb0eac87c (patch)
treee85e0ed36d0f580ce2d32c2d95d7fe583a61fe7e /Eigen/src/plugins/ArrayCwiseUnaryOps.h
parent19a71056ae12f78b2d90828be83c84f9966a0837 (diff)
Add log10 array support
Diffstat (limited to 'Eigen/src/plugins/ArrayCwiseUnaryOps.h')
-rw-r--r--Eigen/src/plugins/ArrayCwiseUnaryOps.h17
1 files changed, 17 insertions, 0 deletions
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<internal::scalar_inverse_op<Scalar>, const Derived> Inverse
typedef CwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived> ExpReturnType;
typedef CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived> LogReturnType;
+typedef CwiseUnaryOp<internal::scalar_log10_op<Scalar>, const Derived> Log10ReturnType;
typedef CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived> CosReturnType;
typedef CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived> SinReturnType;
typedef CwiseUnaryOp<internal::scalar_acos_op<Scalar>, 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